mirror of
https://github.com/neovim/neovim.git
synced 2026-08-15 11:59:31 +00:00
Problem: 'breakindent' and 'showbreak' draw their own padding with no reference to whatever decoration or syntax highlight is currently active, so it goes unhighlighted even mid-highlight, not just past a real EOL. Gating this on the decoration's `hl_eol` flag (as an earlier version of this fix did) missed plain highlights with no `hl_eol` at all, which have the exact same problem. Solution: Snapshot decor_attr into decor_attr_save right before it can be reset by 'linebreak' filler handling, and pass it into handle_breakindent()/handle_showbreak_and_filler() to extend into their padding: it is not a real end of the highlight, just screen cells with no buffer text. Like the 'linebreak' filler, an underline/strikethrough/overline is excluded, since it looks like a broken line drawn over the gap. This also fixes 'breakindent' losing the highlight right after a real 'linebreak' word-push, since that reset otherwise leaked into the next row.