Commit: patch 9.1.0061: UX of visual highlighting can be improved

54 views
Skip to first unread message

Christian Brabandt

unread,
Jan 28, 2024, 5:39:29 PM1/28/24
to vim...@googlegroups.com
patch 9.1.0061: UX of visual highlighting can be improved

Commit: https://github.com/vim/vim/commit/e6d8b4662ddf9356da53f56e363b67b524fd8825
Author: Christian Brabandt <c...@256bit.org>
Date: Sun Jan 28 23:33:29 2024 +0100

patch 9.1.0061: UX of visual highlighting can be improved

Problem: UX of visual highlighting can be improved
Solution: Improve readibility of visual highlighting,
by setting better foreground and background
colors

The default visual highlighting currently is nice in that it overlays
the actual syntax highlighting by using a separate distinct background
color.

However, this can cause hard to read text, because the contrast
between the actual syntax element and the background color is way too
low. That is an issue, that has been bothering colorschemes authors for
quite some time so much, that they are defining the Visual highlighting
group to use a separate foreground and background color, so that the
syntax highlighting vanishes, but the text remains readable (ref:
vim/colorschemes#250)

So this is an attempt to perform the same fix for the default Visual
highlighting and just use a default foreground and background color
instead of using reverse.

I also removed the hard-coded changes to the Visual highlighting in
init_highlight. It's not quite clear to me, why those were there and not
added directly to the highlighting_init_<dark|light> struct.

closes: #13663
related: vim/colorschemes#250

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/highlight.c b/src/highlight.c
index 3381208fd..85726f828 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -221,8 +221,8 @@ static char *(highlight_init_light[]) = {
CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue",
"SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"),
#endif
- CENT("Visual term=reverse",
- "Visual term=reverse guibg=LightGrey"),
+ CENT("Visual ctermbg=DarkGrey ctermfg=White",
+ "Visual ctermbg=DarkGrey ctermfg=White guibg=LightGrey"),
#ifdef FEAT_DIFF
CENT("DiffAdd term=bold ctermbg=LightBlue",
"DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"),
@@ -310,8 +310,8 @@ static char *(highlight_init_dark[]) = {
CENT("SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan",
"SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"),
#endif
- CENT("Visual term=reverse",
- "Visual term=reverse guibg=DarkGrey"),
+ CENT("Visual ctermbg=Grey ctermfg=Black",
+ "Visual ctermbg=Grey ctermfg=Black guibg=#575757"),
#ifdef FEAT_DIFF
CENT("DiffAdd term=bold ctermbg=DarkBlue",
"DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"),
@@ -438,14 +438,8 @@ init_highlight(
// With 8 colors brown is equal to yellow, need to use black for Search fg
// to avoid Statement highlighted text disappears.
// Clear the attributes, needed when changing the t_Co value.
- if (t_colors > 8)
- do_highlight((char_u *)(*p_bg == 'l'
- ? "Visual cterm=NONE ctermbg=LightGrey"
- : "Visual cterm=NONE ctermbg=DarkGrey"), FALSE, TRUE);
- else
+ if (t_colors <= 8)
{
- do_highlight((char_u *)"Visual cterm=reverse ctermbg=NONE",
- FALSE, TRUE);
if (*p_bg == 'l')
do_highlight((char_u *)"Search ctermfg=black", FALSE, TRUE);
}
diff --git a/src/testdir/dumps/Test_balloon_eval_term_02.dump b/src/testdir/dumps/Test_balloon_eval_term_02.dump
index 51c5e328d..4771b3295 100644
--- a/src/testdir/dumps/Test_balloon_eval_term_02.dump
+++ b/src/testdir/dumps/Test_balloon_eval_term_02.dump
@@ -1,6 +1,6 @@
|o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
|t|w|o| |t|X|o| |t|w|o| @38
-|t|h|r|e|e+0&#e0e0e08| |t|h>r+0&#ffffff0|e@1| |t|h|r|e@1| @32
+|t|h|r|e|e+0#ffffff16#6c6c6c255| |t|h>r+0#0000000#ffffff0|e@1| |t|h|r|e@1| @32
|~+0#4040ff13&| @2| +0#0000001#ffd7ff255@17| +0#4040ff13#ffffff0@27
|~| @2| +0#0000001#ffd7ff255|l|i|n|e| |3| |c|o|l|u|m|n| |5|:| | +0#4040ff13#ffffff0@27
|~| @2| +0#0000001#ffd7ff255|e| |t|h|r|<| @10| +0#4040ff13#ffffff0@27
diff --git a/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump b/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
index b6e20b7ce..d0b367724 100644
--- a/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
+++ b/src/testdir/dumps/Test_cursorline_with_visualmode_01.dump
@@ -1,9 +1,9 @@
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
-|a+0&#e0e0e08|b|c| | +0&#ffffff0@70
->a|b+0&#e0e0e08|c| | +0&#ffffff0@70
+|a+0#ffffff16#6c6c6c255|b|c| | +0#0000000#ffffff0@70
+|a+0#ffffff16#6c6c6c255|b|c| | +0#0000000#ffffff0@70
+|a+0#ffffff16#6c6c6c255|b|c| | +0#0000000#ffffff0@70
+|a+0#ffffff16#6c6c6c255|b|c| | +0#0000000#ffffff0@70
+|a+0#ffffff16#6c6c6c255|b|c| | +0#0000000#ffffff0@70
+>a|b+0#ffffff16#6c6c6c255|c| | +0#0000000#ffffff0@70
|a|b|c| @71
|a|b|c| @71
|a|b|c| @71
diff --git a/src/testdir/dumps/Test_display_scroll_update_visual.dump b/src/testdir/dumps/Test_display_scroll_update_visual.dump
index c174390d7..3f5a01f27 100644
--- a/src/testdir/dumps/Test_display_scroll_update_visual.dump
+++ b/src/testdir/dumps/Test_display_scroll_update_visual.dump
@@ -1,4 +1,4 @@
-| +0#0000e05#a8a8a8255@1>f+0#0000000#ffffff0|o+0&#e0e0e08@1| | +0&#ffffff0@53
+| +0#0000e05#a8a8a8255@1>f+0#0000000#ffffff0|o+0#ffffff16#6c6c6c255@1| | +0#0000000#ffffff0@53
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @54
diff --git a/src/testdir/dumps/Test_echowin_showmode.dump b/src/testdir/dumps/Test_echowin_showmode.dump
index 24eb4d023..ec5110225 100644
--- a/src/testdir/dumps/Test_echowin_showmode.dump
+++ b/src/testdir/dumps/Test_echowin_showmode.dump
@@ -1,4 +1,4 @@
->o+0&#ffffff0|n+0&#e0e0e08|e| | +0&#ffffff0@70
+>o+0&#ffffff0|n+0#ffffff16#6c6c6c255|e| | +0#0000000#ffffff0@70
|t|w|o| @71
|~+0#4040ff13&| @73
|~| @73
diff --git a/src/testdir/dumps/Test_hlsearch_visual_1.dump b/src/testdir/dumps/Test_hlsearch_visual_1.dump
index 99150dbe3..dcdbe3aa7 100644
--- a/src/testdir/dumps/Test_hlsearch_visual_1.dump
+++ b/src/testdir/dumps/Test_hlsearch_visual_1.dump
@@ -1,6 +1,6 @@
-|x+0&#ffffff0@2| |y+2&#ffff4012|y+2&#e0e0e08@1| +0&&|z@2| | +0&#ffffff0@27
-|x+0&#e0e0e08@2| |y+2&&@2| +0&&|z@2| | +0&#ffffff0@27
-|x+0&#e0e0e08@2| |y+2&&>y+2&#ffff4012@1| +0&#ffffff0|z@2| @28
+|x+0&#ffffff0@2| |y+2&#ffff4012|y+2#ffffff16#6c6c6c255@1| +0&&|z@2| | +0#0000000#ffffff0@27
+|x+0#ffffff16#6c6c6c255@2| |y+2&&@2| +0&&|z@2| | +0#0000000#ffffff0@27
+|x+0#ffffff16#6c6c6c255@2| |y+2&&>y+2#0000000#ffff4012@1| +0&#ffffff0|z@2| @28
|~+0#4040ff13&| @38
|~| @38
|-+2#0000000&@1| |V|I|S|U|A|L| |-@1|3+0&&| @8|3|,|6| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_popup_command_03.dump b/src/testdir/dumps/Test_popup_command_03.dump
index fa2ac70b0..c01af05ca 100644
--- a/src/testdir/dumps/Test_popup_command_03.dump
+++ b/src/testdir/dumps/Test_popup_command_03.dump
@@ -1,5 +1,5 @@
|o+0&#ffffff0|n|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @51
-|a|n|d| |o|n|e| |t|w|o| |X+0&#e0e0e08|t|h|r|e@1> +0&#ffffff0|f|o|u|r| |f|i|v|e| @46
+|a|n|d| |o|n|e| |t|w|o| |X+0#ffffff16#6c6c6c255|t|h|r|e@1> +0#0000000#ffffff0|f|o|u|r| |f|i|v|e| @46
|o|n|e| |m|o|r|e| |t|w|o| |t|h|r|e@1| |f|o|u|r| |f|i|v|e| @46
|~+0#4040ff13&| @73
|~| @73
diff --git a/src/testdir/dumps/Test_prop_inserts_text_1.dump b/src/testdir/dumps/Test_prop_inserts_text_1.dump
index 7d1b1027a..3e4d74abc 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_1.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_1.dump
@@ -1,6 +1,6 @@
|i+0&#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d| |s|o
|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n>g| @27
-|p|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @40
+|p|r|e|s+0#ffffff16#6c6c6c255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @40
|F|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @34
|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@49
|l|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @42
diff --git a/src/testdir/dumps/Test_prop_inserts_text_2.dump b/src/testdir/dumps/Test_prop_inserts_text_2.dump
index 2a5b2f3a7..08bbcb93f 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_2.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_2.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n>g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#ffffff16#6c6c6c255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_3.dump b/src/testdir/dumps/Test_prop_inserts_text_3.dump
index 36a4b8ce1..7fe8a86ea 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_3.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_3.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s>t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#ffffff16#6c6c6c255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s>t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_4.dump b/src/testdir/dumps/Test_prop_inserts_text_4.dump
index 8bb637af1..efae55310 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_4.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_4.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#ffffff16#6c6c6c255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=>1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_5.dump b/src/testdir/dumps/Test_prop_inserts_text_5.dump
index 75194f615..cb4866198 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_5.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_5.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#ffffff16#6c6c6c255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=>2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1|e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_6.dump b/src/testdir/dumps/Test_prop_inserts_text_6.dump
index fb25ddf30..de2bf4504 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_6.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_6.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1|i+0#0000000#ffffff0|n|s|e|r|t| |s|o|m|e| |t|e|x|t| |S+0#ffffff16#e000002|O|M|E| |h+0#0000000#ffffff0|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |O+0&#ffff4012|T|H|E|R| |t+0&#ffffff0|h|e|r|e| |a|n|d|
| +0#0000e05#a8a8a8255@1|s+0#0000000#ffffff0|o|m|e| |m|o|r|e| |t|e|x|t| |a|f|t|e|r| |M+0&#5fd7ff255|O|R|E| |w+0&#ffffff0|r|a|p@1|i|n|g| @23
-| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0&#e0e0e08|ö|m|e|和*&|平|t+&|é|x|t|p+0&#ffffff0|o|s|t| @38
+| +0#0000e05#a8a8a8255@1|p+0#0000000#ffffff0|r|e|s+0#ffffff16#6c6c6c255|ö|m|e|和*&|平|t+&|é|x|t|p+0#0000000#ffffff0|o|s|t| @38
| +0#0000e05#a8a8a8255@1|F+0#0000000#ffffff0|o@1| |f|o@1| |=| |{| |.+0#0000e05&|x|=|1+0#0000000&|,| |.+0#0000e05&|y|=|2+0#0000000&| |}|;| @32
| +0#0000e05#a8a8a8255@1>e+0#ffffff16#e000002|m|p|t|y| |l|i|n|e| +0#0000000#ffffff0@47
| +0#0000e05#a8a8a8255@1|l+0#0000000#ffffff0|o@1|k| |n|o| |h|i|g|h|l|i|g|h|t| @40
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump
index 2383b4a0a..7d6865ecd 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_2.dump
@@ -1,6 +1,6 @@
-|1+0&#e0e0e08|2|3+0&#ffffff0|4|5|6|7|8|9| @50
-|1+0&#e0e0e08|-+0#e000e06#ffffff0|口*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
-|1+0&#e0e0e08|2|口*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
-|1+0&#e0e0e08>2+0&#ffffff0|3|4|5|6|7|8|9| @50
+|1+0#ffffff16#6c6c6c255|2|3+0#0000000#ffffff0|4|5|6|7|8|9| @50
+|1+0#ffffff16#6c6c6c255|-+0#e000e06#ffffff0|口*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
+|1+0#ffffff16#6c6c6c255|2|口*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
+|1+0#ffffff16#6c6c6c255>2+0#0000000#ffffff0|3|4|5|6|7|8|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|2| @6|4|,|2| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump
index 920cb1d7b..32d394247 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_3.dump
@@ -1,6 +1,6 @@
-|1+0&#e0e0e08|2|3|4+0&#ffffff0|5|6|7|8|9| @50
-|1+0&#e0e0e08|-+0#e000e06#ffffff0|口*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
-|1+0&#e0e0e08|2|口*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
-|1+0&#e0e0e08|2>3+0&#ffffff0|4|5|6|7|8|9| @50
+|1+0#ffffff16#6c6c6c255|2|3|4+0#0000000#ffffff0|5|6|7|8|9| @50
+|1+0#ffffff16#6c6c6c255|-+0#e000e06#ffffff0|口*&|-+&|2+0#0000000&|3|4|5|6|7|8|9| @46
+|1+0#ffffff16#6c6c6c255|2|口*0#e000e06#ffffff0|3+0#0000000&|4|5|6|7|8|9| @48
+|1+0#ffffff16#6c6c6c255|2>3+0#0000000#ffffff0|4|5|6|7|8|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|3| @6|4|,|3| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump
index 0017f0224..dfd627ffa 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_4.dump
@@ -1,6 +1,6 @@
-|1+0&#e0e0e08|2|3|4|5|6|7|8+0&#ffffff0|9| @50
-|1+0&#e0e0e08|-+0#e000e06#ffffff0|口*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1+0&#e0e0e08|2|口*0#e000e06#ffffff0|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1+0&#e0e0e08|2|3|4|5|6>7+0&#ffffff0|8|9| @50
+|1+0#ffffff16#6c6c6c255|2|3|4|5|6|7|8+0#0000000#ffffff0|9| @50
+|1+0#ffffff16#6c6c6c255|-+0#e000e06#ffffff0|口*&|-+&|2+0#ffffff16#6c6c6c255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1+0#ffffff16#6c6c6c255|2|口*0#e000e06#ffffff0|3+0#ffffff16#6c6c6c255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1+0#ffffff16#6c6c6c255|2|3|4|5|6>7+0#0000000#ffffff0|8|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|7| @6|4|,|7| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump
index cb7e0c90a..67164b986 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_5.dump
@@ -1,6 +1,6 @@
-|1+0&#ffffff0|2+0&#e0e0e08|3|4|5|6|7|8+0&#ffffff0|9| @50
-|1|-+0#e000e06&|口*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1|2+0&#e0e0e08|口*0#e000e06#ffffff0|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1>2|3+0&#e0e0e08|4|5|6|7|8+0&#ffffff0|9| @50
+|1+0&#ffffff0|2+0#ffffff16#6c6c6c255|3|4|5|6|7|8+0#0000000#ffffff0|9| @50
+|1|-+0#e000e06&|口*&|-+&|2+0#ffffff16#6c6c6c255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1|2+0#ffffff16#6c6c6c255|口*0#e000e06#ffffff0|3+0#ffffff16#6c6c6c255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1>2|3+0#ffffff16#6c6c6c255|4|5|6|7|8+0#0000000#ffffff0|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|6| @6|4|,|2| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump
index c4be65f29..81e894ce3 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_6.dump
@@ -1,6 +1,6 @@
-|1+0&#ffffff0|2|3+0&#e0e0e08|4|5|6|7|8+0&#ffffff0|9| @50
-|1|-+0#e000e06&|口*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1|2|口*0#e000e06&|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1|2>3|4+0&#e0e0e08|5|6|7|8+0&#ffffff0|9| @50
+|1+0&#ffffff0|2|3+0#ffffff16#6c6c6c255|4|5|6|7|8+0#0000000#ffffff0|9| @50
+|1|-+0#e000e06&|口*&|-+&|2+0#ffffff16#6c6c6c255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1|2|口*0#e000e06&|3+0#ffffff16#6c6c6c255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1|2>3|4+0#ffffff16#6c6c6c255|5|6|7|8+0#0000000#ffffff0|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|5| @6|4|,|3| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump b/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump
index 54c7fde43..e1045ff6a 100644
--- a/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump
+++ b/src/testdir/dumps/Test_prop_inserts_text_visual_block_7.dump
@@ -1,6 +1,6 @@
-|1+0&#ffffff0|2|3|4+0&#e0e0e08|5|6|7|8+0&#ffffff0|9| @50
-|1|-+0#e000e06&|口*&|-+&|2+0#0000000#e0e0e08|3|4+0&#ffffff0|5|6|7|8|9| @46
-|1|2|口*0#e000e06&|3+0#0000000#e0e0e08|4|5|6+0&#ffffff0|7|8|9| @48
-|1|2|3>4|5+0&#e0e0e08|6|7|8+0&#ffffff0|9| @50
+|1+0&#ffffff0|2|3|4+0#ffffff16#6c6c6c255|5|6|7|8+0#0000000#ffffff0|9| @50
+|1|-+0#e000e06&|口*&|-+&|2+0#ffffff16#6c6c6c255|3|4+0#0000000#ffffff0|5|6|7|8|9| @46
+|1|2|口*0#e000e06&|3+0#ffffff16#6c6c6c255|4|5|6+0#0000000#ffffff0|7|8|9| @48
+|1|2|3>4|5+0#ffffff16#6c6c6c255|6|7|8+0#0000000#ffffff0|9| @50
|~+0#4040ff13&| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|4|x|4| @6|4|,|4| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_with_text_above_6.dump b/src/testdir/dumps/Test_prop_with_text_above_6.dump
index da282285f..941abb6b6 100644
--- a/src/testdir/dumps/Test_prop_with_text_above_6.dump
+++ b/src/testdir/dumps/Test_prop_with_text_above_6.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35
-| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#0000000#e0e0e08|n|s|e|r|t|e>d+0&#ffffff0| |o|n|e| |t|w|o| @37
+| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#ffffff16#6c6c6c255|n|s|e|r|t|e>d+0#0000000#ffffff0| |o|n|e| |t|w|o| @37
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0&#ffffff0@48
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3| +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37
diff --git a/src/testdir/dumps/Test_prop_with_text_above_7.dump b/src/testdir/dumps/Test_prop_with_text_above_7.dump
index c50749b81..bcfada217 100644
--- a/src/testdir/dumps/Test_prop_with_text_above_7.dump
+++ b/src/testdir/dumps/Test_prop_with_text_above_7.dump
@@ -1,6 +1,6 @@
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|f+0#0000000#ffff4012|i|r|s|t| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@36
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|s+0#0000000#ffd7ff255|e|c|o|n|d| |t|h|i|n|g| |a|b|o|v|e| +0&#ffffff0@35
-| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#0000000#e0e0e08|n|s|e|r|t|e>d+0&#ffffff0| +0&#e0e0e08|o|n|e| |t|w|o| +0&#ffffff0@37
+| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|1| |i+0#ffffff16#6c6c6c255|n|s|e|r|t|e>d+0#0000000#ffffff0| +0#ffffff16#6c6c6c255|o|n|e| |t|w|o| +0#0000000#ffffff0@37
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3|b+0#0000000#5fd7ff255|e|l|o|w| +0#4040ff13#ffffff0| +0#0000000&@47
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@1|2| |t+0#0000000&|h|r|e@1| |f|o|u|r| @43
| +0#0000e05#a8a8a8255@1| +0#af5f00255#ffffff0@3| +0#0000000&@2|a+0&#ffff4012|n|o|t|h|e|r| |t|h|i|n|g| +0&#ffffff0@37
diff --git a/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump b/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump
index 1bc9903bc..ad28571f6 100644
--- a/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump
+++ b/src/testdir/dumps/Test_prop_with_text_empty_line_6.dump
@@ -1,8 +1,8 @@
|X+0&#ffff4012@59
-|a+0&#e0e0e08@1>a+0&#ffffff0| @56
+|a+0#ffffff16#6c6c6c255@1>a+0#0000000#ffffff0| @56
|X+0&#ffff4012@59
@1| +0&#ffffff0@58
-|b+0&#e0e0e08@2|b+0&#ffffff0@2| @53
+|b+0#ffffff16#6c6c6c255@2|b+0#0000000#ffffff0@2| @53
|~+0#4040ff13&| @58
|~| @58
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@13|3|x|3| @6|2|,|3| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_prop_with_text_override_2.dump b/src/testdir/dumps/Test_prop_with_text_override_2.dump
index 334929e11..48a3f3638 100644
--- a/src/testdir/dumps/Test_prop_with_text_override_2.dump
+++ b/src/testdir/dumps/Test_prop_with_text_override_2.dump
@@ -1,4 +1,4 @@
-|s+0&#ffffff0|o|m+0&#e0e0e08|e| | +0#4040ff13#40ffff15|i|n|s|e|r|t|e|d| |t+0#0000000#e0e0e08|e|x|t| |h|e>r+0&#ffffff0|e| @35
+|s+0&#ffffff0|o|m+0#ffffff16#6c6c6c255|e| | +0#4040ff13#40ffff15|i|n|s|e|r|t|e|d| |t+0#ffffff16#6c6c6c255|e|x|t| |h|e>r+0#0000000#ffffff0|e| @35
|~+0#4040ff13&| @58
|~| @58
|~| @58
diff --git a/src/testdir/dumps/Test_statusline_showcmd_3.dump b/src/testdir/dumps/Test_statusline_showcmd_3.dump
index 049e0f777..e244acd3d 100644
--- a/src/testdir/dumps/Test_statusline_showcmd_3.dump
+++ b/src/testdir/dumps/Test_statusline_showcmd_3.dump
@@ -1,6 +1,6 @@
-|a+0&#e0e0e08| +0&#ffffff0@73
-|b+0&#e0e0e08| +0&#ffffff0@73
-|c+0&#e0e0e08> +0&#ffffff0@73
+|a+0#ffffff16#6c6c6c255| +0#0000000#ffffff0@73
+|b+0#ffffff16#6c6c6c255| +0#0000000#ffffff0@73
+|c+0#ffffff16#6c6c6c255> +0#0000000#ffffff0@73
|~+0#4040ff13&| @73
|3+3#0000000&|x|2| @71
|-+2&&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@56
diff --git a/src/testdir/dumps/Test_syntax_c_01.dump b/src/testdir/dumps/Test_syntax_c_01.dump
index 72242162e..0426a50e3 100644
--- a/src/testdir/dumps/Test_syntax_c_01.dump
+++ b/src/testdir/dumps/Test_syntax_c_01.dump
@@ -4,8 +4,8 @@
| +0#0000e05&@2|i|n|t| @2|n|o|t|_|u|s|e|d|;| +0#0000000&@56
|#+0#e000e06&|e|l|s|e| +0#0000000&@69
@3|i+0#00e0003&|n|t| +0#0000000&@2|u|s|e|d|;| @60
-|#+0#e000e06&|e+0&#e0e0e08|n|d|i|f| +0#0000000&| +0&#ffffff0@67
-| +0&#e0e0e08@2|p|r|i|n|t|f|(|"+0#e000002&|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| >C+0&#ffffff0| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27
+|#+0#e000e06&|e+0#ffffff16#6c6c6c255|n|d|i|f| | +0#0000000#ffffff0@67
+| +0#ffffff16#6c6c6c255@2|p|r|i|n|t|f|(|"|J|u|s|t| |a|n| |e|x|a|m|p|l|e| |p|i|e|c|e| |o|f| >C+0#e000002#ffffff0| |c|o|d|e|\+0#e000e06&|n|"+0#e000002&|)+0#0000000&|;| @27
@3|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|0+0#e000002&|x|0|f@1|;+0#0000000&| @58
|}| @73
| +0#ffffff16#ff404010@16| +0#0000000#ffffff0@57
diff --git a/src/testdir/dumps/Test_tabline_showcmd_3.dump b/src/testdir/dumps/Test_tabline_showcmd_3.dump
index 3e29cda5f..52c91be50 100644
--- a/src/testdir/dumps/Test_tabline_showcmd_3.dump
+++ b/src/testdir/dumps/Test_tabline_showcmd_3.dump
@@ -1,6 +1,6 @@
|3+1&#ffffff0|x|2| @71
-|a+0&#e0e0e08| +0&#ffffff0@73
-|b+0&#e0e0e08| +0&#ffffff0@73
-|c+0&#e0e0e08> +0&#ffffff0@73
+|a+0#ffffff16#6c6c6c255| +0#0000000#ffffff0@73
+|b+0#ffffff16#6c6c6c255| +0#0000000#ffffff0@73
+|c+0#ffffff16#6c6c6c255> +0#0000000#ffffff0@73
|~+0#4040ff13&| @73
|-+2#0000000&@1| |V|I|S|U|A|L| |B|L|O|C|K| |-@1| +0&&@38|3|,|2| @10|A|l@1|
diff --git a/src/testdir/dumps/Test_terminal_popup_7.dump b/src/testdir/dumps/Test_terminal_popup_7.dump
index e7e5aae50..32c058ba7 100644
--- a/src/testdir/dumps/Test_terminal_popup_7.dump
+++ b/src/testdir/dumps/Test_terminal_popup_7.dump
@@ -4,7 +4,7 @@
|3| @12|╔+0#0000001#ffd7ff255|═@44|╗| +0#0000000#ffffff0@13
|4| @12|║+0#0000001#ffd7ff255|s|o|m|e| |t|e|x|t| @35|║| +0#0000000#ffffff0@13
|5| @12|║+0#0000001#ffd7ff255|t|o| |e+0&#ffff4012|d|i|t| +0&#ffd7ff255@37|║| +0#0000000#ffffff0@13
-|6| @12|║+0#0000001#ffd7ff255|i+0&#e0e0e08|n| |a| >p+0&#ffd7ff255|o|p|u|p| |w|i|n|d|o|w| @27|║| +0#0000000#ffffff0@13
+|6| @12|║+0#0000001#ffd7ff255|i+0#ffffff16#6c6c6c255|n| |a| >p+0#0000001#ffd7ff255|o|p|u|p| |w|i|n|d|o|w| @27|║| +0#0000000#ffffff0@13
|7| @12|║+0#0000001#ffd7ff255|~+0#4040ff13&| @43|║+0#0000001&| +0#0000000#ffffff0@13
|8| @12|║+0#0000001#ffd7ff255|~+0#4040ff13&| @43|║+0#0000001&| +0#0000000#ffffff0@13
|9| @12|║+0#0000001#ffd7ff255|~+0#4040ff13&| @43|║+0#0000001&| +0#0000000#ffffff0@13
diff --git a/src/testdir/dumps/Test_textprop_hl_override_2.dump b/src/testdir/dumps/Test_textprop_hl_override_2.dump
index 187233d12..9d05cbb0c 100644
--- a/src/testdir/dumps/Test_textprop_hl_override_2.dump
+++ b/src/testdir/dumps/Test_textprop_hl_override_2.dump
@@ -1,6 +1,6 @@
|O+0&#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| |o+0#4040ff13#ffff4012|n|e| |o+0#0000000#ffffff0|n|e| @55
|T|w|o| |t+0#4040ff13#ffff4012|w|o| |t+0#0000000#ffffff0|w|o| |t+0#4040ff13#ffff4012|w|o| |t+0#0000000#ffffff0|w|o| @55
-|T|h|r+0&#e0e0e08|e|e+0#4040ff13&| |t|h|r+0#0000000&|e@1| |t+0#4040ff13#ffff4012|h|r|e|e+0#0000000#e0e0e08| |t|h|r>e+0&#ffffff0@1| @51
+|T|h|r+0#ffffff16#6c6c6c255|e@1| |t|h|r|e@1| |t+0#4040ff13#ffff4012|h|r|e|e+0#ffffff16#6c6c6c255| |t|h|r>e+0#0000000#ffffff0@1| @51
|~+0#4040ff13&| @73
|~| @73
|~| @73
diff --git a/src/testdir/dumps/Test_vim9_no_redraw.dump b/src/testdir/dumps/Test_vim9_no_redraw.dump
index 1d77a08d0..fe4070b5a 100644
--- a/src/testdir/dumps/Test_vim9_no_redraw.dump
+++ b/src/testdir/dumps/Test_vim9_no_redraw.dump
@@ -1,4 +1,4 @@
-|s+0&#ffffff0|o+0&#e0e0e08|m|e| |t|e|x|t| | +0&#ffffff0@64
+|s+0&#ffffff0|o+0#ffffff16#6c6c6c255|m|e| |t|e|x|t| | +0#0000000#ffffff0@64
|~+0#4040ff13&| @73
|~| @73
|~| @73
diff --git a/src/testdir/dumps/Test_visual_block_with_virtualedit.dump b/src/testdir/dumps/Test_visual_block_with_virtualedit.dump
index 2991a633b..610942112 100644
--- a/src/testdir/dumps/Test_visual_block_with_virtualedit.dump
+++ b/src/testdir/dumps/Test_visual_block_with_virtualedit.dump
@@ -1,6 +1,6 @@
-|a+0&#e0e0e08@5> +0&#ffffff0@43
-|b+0&#e0e0e08@3| @2| +0&#ffffff0@42
-|c+0&#e0e0e08@1| @4| +0&#ffffff0@42
+|a+0#ffffff16#6c6c6c255@5> +0#0000000#ffffff0@43
+|b+0#ffffff16#6c6c6c255@3| @2| +0#0000000#ffffff0@42
+|c+0#ffffff16#6c6c6c255@1| @4| +0#0000000#ffffff0@42
|~+0#4040ff13&| @48
|~| @48
|~| @48
diff --git a/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump b/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump
index 3c6215612..be7f8bbbd 100644
--- a/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump
+++ b/src/testdir/dumps/Test_visual_block_with_virtualedit2.dump
@@ -1,6 +1,6 @@
-|a+0&#e0e0e08@5| | +0&#ffffff0@42
-|b+0&#e0e0e08@3| @2| +0&#ffffff0@42
-|c+0&#e0e0e08@1> +0&#ffffff0| +0&#e0e0e08@3| +0&#ffffff0@42
+|a+0#ffffff16#6c6c6c255@5| | +0#0000000#ffffff0@42
+|b+0#ffffff16#6c6c6c255@3| @2| +0#0000000#ffffff0@42
+|c+0#ffffff16#6c6c6c255@1> +0#0000000#ffffff0| +0#ffffff16#6c6c6c255@3| +0#0000000#ffffff0@42
|~+0#4040ff13&| @48
|~| @48
|~| @48
diff --git a/src/testdir/dumps/Test_visual_hl_with_showbreak.dump b/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
index fa0b2dc09..6c700d7d6 100644
--- a/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
+++ b/src/testdir/dumps/Test_visual_hl_with_showbreak.dump
@@ -1,5 +1,5 @@
|a+0&#ffffff0@48>a
-|++0#4040ff13&|a+0#0000000#e0e0e08@3|a+0&#ffffff0@5| @38
+|++0#4040ff13&|a+0#ffffff16#6c6c6c255@3|a+0#0000000#ffffff0@5| @38
|~+0#4040ff13&| @48
|~| @48
|~| @48
diff --git a/src/testdir/dumps/Test_visual_sbr_1.dump b/src/testdir/dumps/Test_visual_sbr_1.dump
index 0a9511d38..a93bd75e3 100644
--- a/src/testdir/dumps/Test_visual_sbr_1.dump
+++ b/src/testdir/dumps/Test_visual_sbr_1.dump
@@ -1,4 +1,4 @@
-|>+0#4040ff13#ffffff0| +0#0000000#e0e0e08|k|a|s|d| |g|u|b|e|r|g|r|e|n|,| |n|o| |s|e|a| |t|a|k|i|m|a|t|a| |s|a|n|c|t|u|s| |e|s|t| |L|o|r|e|m| |i|p|s|u|m| |d|o|l|o|r| |s|i|t| |a|m|e|t|.> +0&#ffffff0@1
+|>+0#4040ff13#ffffff0| +0#ffffff16#6c6c6c255|k|a|s|d| |g|u|b|e|r|g|r|e|n|,| |n|o| |s|e|a| |t|a|k|i|m|a|t|a| |s|a|n|c|t|u|s| |e|s|t| |L|o|r|e|m| |i|p|s|u|m| |d|o|l|o|r| |s|i|t| |a|m|e|t|.> +0#0000000#ffffff0@1
@75
@75
@75
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump
index f61440ad3..262fb0099 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_1.dump
@@ -1,4 +1,4 @@
-|<+0#4040ff13#ffffff0@2| +0#0000000&@4| +0&#e0e0e08|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0&#ffffff0@45
+|<+0#4040ff13#ffffff0@2| +0#0000000&@4| +0#ffffff16#6c6c6c255|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0#0000000#ffffff0@45
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3@1|0| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump
index 1f1094058..84a280d1f 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_2.dump
@@ -1,4 +1,4 @@
-| +0&#ffffff0@7|++0#4040ff13&@2| +0#0000000#e0e0e08|9|0| |9|1| |9|2| |9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0&#ffffff0@33
+| +0&#ffffff0@7|++0#4040ff13&@2| +0#ffffff16#6c6c6c255|9|0| |9|1| |9|2| |9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0#0000000#ffffff0@33
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3|4|2| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump
index d36d6752e..32abbd02d 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_3.dump
@@ -1,4 +1,4 @@
-|++0#4040ff13#ffffff0@2| +0#0000000&@4| +0&#e0e0e08|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0&#ffffff0@45
+|++0#4040ff13#ffffff0@2| +0#0000000&@4| +0#ffffff16#6c6c6c255|9|3| |9|4| |9|5| |9|6| |9|7| |9|8| |9@1> +0#0000000#ffffff0@45
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3@1|0| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump b/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump
index 101352e27..3d122e68b 100644
--- a/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump
+++ b/src/testdir/dumps/Test_visual_starts_before_skipcol_4.dump
@@ -1,4 +1,4 @@
-|++0#4040ff13#ffffff0@2| +0#0000000#e0e0e08|9|8| |9@1> +0&#ffffff0@65
+|++0#4040ff13#ffffff0@2| +0#ffffff16#6c6c6c255|9|8| |9@1> +0#0000000#ffffff0@65
|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @43|1|,|2|9|1|-|3|1|0| @5|A|l@1
| +0&&@74
|~+0#4040ff13&| @73
diff --git a/src/testdir/dumps/Test_win_gotoid_2.dump b/src/testdir/dumps/Test_win_gotoid_2.dump
index 7a778f5e3..e13632aaf 100644
--- a/src/testdir/dumps/Test_win_gotoid_2.dump
+++ b/src/testdir/dumps/Test_win_gotoid_2.dump
@@ -6,7 +6,7 @@
|[+1&&|N|o| |N|a|m|e|]| @47|1|,|1| @11|T|o|p
|2+0&&|1| @72
|2@1| @72
-|2+0&#e0e0e08>3+0&#ffffff0| @72
+|2+0#ffffff16#6c6c6c255>3+0#0000000#ffffff0| @72
|2|4| @72
|2|5| @72
|2|6| @72
diff --git a/src/testdir/dumps/Test_wincolor_01.dump b/src/testdir/dumps/Test_wincolor_01.dump
index 5a5ccf506..f3d2cd02c 100644
--- a/src/testdir/dumps/Test_wincolor_01.dump
+++ b/src/testdir/dumps/Test_wincolor_01.dump
@@ -1,6 +1,6 @@
| +0#af5f00255#ffd7ff255@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
-| +0#af5f00255&@1|1| |1+0#0000001&@4|1+0&#e0e0e08@4| | +0&#ffd7ff255@59
-| +8#af5f00255&@1|0| |2+0#0000001#e0e0e08@4>2+0&#ffd7ff255@5| +8&&@59
+| +0#af5f00255&@1|1| |1+0#0000001&@4|1+0#ffffff16#6c6c6c255@4| | +0#0000001#ffd7ff255@59
+| +8#af5f00255&@1|0| |2+0#ffffff16#6c6c6c255@4>2+0#0000001#ffd7ff255@5| +8&&@59
| +0#af5f00255&@1|1| |3+0#0000001&| |h|e|r|e+0&#e0e0e08| +0&#ffd7ff255|3| @62
| +0#af5f00255&@1|2| | +0#0000001&@4| +0&#e0e0e08| +0&#ffd7ff255@64
| +0#af5f00255&@1|3| |t+0#40ff4011&|h|e| |c|a+0&#e0e0e08|t+0&#ffd7ff255| |i|s| |o+1&&|u|t| +0&&|o|f| |t|h|e| |b|a|g| +0#0000001&@45
diff --git a/src/version.c b/src/version.c
index b78abeacd..749a918fb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 61,
/**/
60,
/**/

Christian Brabandt

unread,
Jan 28, 2024, 5:41:28 PM1/28/24
to vim...@googlegroups.com
I know this change could be considered quite controversial. However, I
hope I have improved readability and UX of visual highlighting quite a
bit, even so the syntax highlighting of the visual highlighted items got
lost. Let me know if you think this is a problem.

Thanks,
Christian
--
Play Rogue, visit exotic locations, meet strange creatures and kill them.

John Marriott

unread,
Jan 29, 2024, 2:12:52 PM1/29/24
to vim...@googlegroups.com


On 29-Jan-2024 09:41, Christian Brabandt wrote:
I know this change could be considered quite controversial. However, I
hope I have improved readability and UX of visual highlighting quite a 
bit, even so the syntax highlighting of the visual highlighted items got 
lost.  Let me know if you think this is a problem.

Thanks,
Christian
Hi Christian,

After this patch I am getting some weird results in my console version of vim on HP-UX (old I know!).

Here is an example of line selection (shift-v) with version 9.1.0060, prior to this change (vim started with vim --clean):


Here is the same after the patch (again vim started with vim --clean):


You can see the bulk of the highlight is not visible, just a little reverse video at the two line ends.

Any ideas of what I can do to restore the previous behaviour with this patch?

Thanks
John

Christian Brabandt

unread,
Jan 29, 2024, 2:35:13 PM1/29/24
to vim...@googlegroups.com

On Di, 30 Jan 2024, John Marriott wrote:

> After this patch I am getting some weird results in my console version of
> vim on HP-UX (old I know!).
>
> Here is an example of line selection (shift-v) with version 9.1.0060, prior
> to this change (vim started with vim --clean):
>
>
> Here is the same after the patch (again vim started with vim --clean):
>
>
> You can see the bulk of the highlight is not visible, just a little reverse
> video at the two line ends.

That is very strange what Terminal is this and how many colors does it
support? Can you check the output of :hi Visual for both versions?

> Any ideas of what I can do to restore the previous behaviour with this
> patch?

You can setup a custom Visual highlighting group. It depends a bit on
your terminal and how many colors it can display.

For a dark background with more than 8 colors:
:hi Visual term=reverse cterm=NONE ctermbg=DarkGrey guibg=DarkGrey
For a light background with more than 8 colors:
:hi Visual term=reverse cterm=NONE ctermbg=LightGrey guibg=LightGrey

Or just use the values that you received from the :hi Visual before the
patch.


Thanks
Christian
--
Today is National Existential Ennui Awareness Day.

John Marriott

unread,
Jan 30, 2024, 11:39:28 AM1/30/24
to vim...@googlegroups.com
Hi Christian,

The terminal is VT220 emulation. Is that what you meant?
I don't know about number of colours. How do you determine that?

Anyway, :hi Visual for 9.1.0060 gives:
Visual   xxxx term=reverse cterm=reverse guibh=LightGrey

:hi Visual for 9.1.0061+ gives:
Visual    xxxx xtermfg=15 xtermbg=8 guibg=LightGrey

I added:
hi Visual term=reverse cterm=NONE ctermbg=LightGrey guibg=LightGrey to my .vimrc and I'm back to normal. Thanks. As for my windows GUI build with this patch, my colours have lost the plot entirely. I use a slightly modified "evening" colour scheme which usually looks like this: After this patch, it looks like this: Adding the removed code from highlight.c fixes it: I hope this makes sense. Cheers John

Christian Brabandt

unread,
Jan 30, 2024, 11:56:55 AM1/30/24
to vim...@googlegroups.com

On Mi, 31 Jan 2024, John Marriott wrote:

>
> The terminal is VT220 emulation. Is that what you meant?

so $TERM=vt220?

> I don't know about number of colours. How do you determine that?

From within Vim :set t_Co?

> Anyway, :hi Visual for 9.1.0060 gives:
> Visual   xxxx term=reverse cterm=reverse guibh=LightGrey
>
> :hi Visual for 9.1.0061+ gives:
> Visual    xxxx xtermfg=15 xtermbg=8 guibg=LightGrey
>
> I added:
> hi Visual term=reverse cterm=NONE ctermbg=LightGrey guibg=LightGrey to my
> .vimrc and I'm back to normal. Thanks. As for my windows GUI build with this
> patch, my colours have lost the plot entirely. I use a slightly modified
> "evening" colour scheme which usually looks like this: After this patch, it
> looks like this: Adding the removed code from highlight.c fixes it: I hope
> this makes sense. Cheers John

Can you try the following patch please? (this partly restores the old
behaviour for 8 color terminals):

#v+
diff --git a/src/highlight.c b/src/highlight.c
index 85726f828..df2b97c27 100644
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -440,6 +440,8 @@ init_highlight(
// Clear the attributes, needed when changing the t_Co value.
if (t_colors <= 8)
{
+ do_highlight((char_u *)"Visual cterm=reverse ctermbg=NONE",
+ FALSE, TRUE);
if (*p_bg == 'l')
do_highlight((char_u *)"Search ctermfg=black", FALSE, TRUE);
}
#v-

Thanks,
Christian
--
problem drinker, n.:
A man who never buys.

John Marriott

unread,
Jan 30, 2024, 12:21:39 PM1/30/24
to vim...@googlegroups.com
Hi Christian,

Yes $TERM=vt220

:set t_Co? from inside vim gives:
t_Co=

I tried your patch and it seems to fix it. I don't understand why
though. When I run :set t_Co inside my Windows GUI vim I get
t_Co=16777216. If the number of colours is 16M, how can t_colors be <= 8
to affect the outcome?

Cheers
John


John Marriott

unread,
Jan 30, 2024, 12:34:54 PM1/30/24
to vim...@googlegroups.com
Wait a minute. I reverted the patch (highlight.c now matches the git
repository) and did a complete rebuilt and now it's working?!? What?
Maybe my colour problem was caused by something else but it looks ok
now. Patch not needed.

Crank call...


Reply all
Reply to author
Forward
0 new messages