[vim/vim] terminal: empty lines don't use the background color of hl-terminal (PR #21093)
h_east (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/[email protected]> |
```
Problem: In a terminal window the empty lines are drawn without the
background color that was set with hl-terminal, while the lines
with text do use it.
Solution: Stop clearing the window attribute on an empty line. The Visual
selection is already combined into the first cell of such a line,
so the background color can be kept.
```
fixes: #21087
related: #17559
related: #20547
---
`win_attr` is both the background color of a terminal line and the switch for
the end-of-line fill (drawline.c:3626). Clearing it skipped that fill, so the
Visual combine added in 9.2.0688 (drawline.c:3692) was never reached and the
background color and the Visual selection were mutually exclusive. Without the
reset both show at once, so deleting it is all that is needed.
The reset was narrowed to the default color in 9.2.0666, which is why the CSI K
case of #20547 kept working. A color set with hl-terminal is folded into the
default color (terminal.c:4640), so only that side stayed broken.
The changes to the three existing tests in test_terminal3.vim wait for the job
to finish before sending keys, which fixes an unrelated flakiness. Can be
split off.
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/21093
-- Commit Summary --
* terminal: empty lines don't use the background color of hl-terminal
-- File Changes --
M src/drawline.c (10)
M src/proto/terminal.pro (1)
M src/terminal.c (13)
A src/testdir/dumps/Test_terminal_hl_empty_1.dump (10)
A src/testdir/dumps/Test_terminal_hl_empty_2.dump (10)
A src/testdir/dumps/Test_terminal_hl_empty_3.dump (10)
M src/testdir/test_terminal3.vim (39)
-- Patch Links --
https://github.com/vim/vim/pull/21093.patch
https://github.com/vim/vim/pull/21093.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/21093
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/21093%40github.com.