From 14e7203713567761c37be3bf182e5669e11041e1 Mon Sep 17 00:00:00 2001 From: Konfekt Date: Wed, 29 Oct 2025 20:11:57 +0000 Subject: [PATCH 01/54] runtime(compiler): Fix escaping in Windows shell command for tombi As observed by Doug Kearns related: #18590 closes: #18661 Signed-off-by: Konfekt Signed-off-by: Christian Brabandt --- runtime/compiler/tombi.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/compiler/tombi.vim b/runtime/compiler/tombi.vim index bab95ba24c..1bf00044ec 100644 --- a/runtime/compiler/tombi.vim +++ b/runtime/compiler/tombi.vim @@ -44,7 +44,7 @@ if s:tombi_nocolor if &shell =~# '\v<%(cmd|cmd)>' CompilerSet makeprg=set\ NO_COLOR=1\ &&\ tombi\ lint elseif &shell =~# '\v<%(powershell|pwsh)>' - CompilerSet makeprg=$env:NO_COLOR="1";\ tombi\ lint + CompilerSet makeprg=$env:NO_COLOR=\"1\";\ tombi\ lint else echoerr "tombi compiler: Unsupported shell for Windows" endif From 5c3e76263100c2c036f1febcb9e8716b719d57e3 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Oct 2025 20:15:01 +0000 Subject: [PATCH 02/54] patch 9.1.1888: Wrong display with cpo+=$, matchparen and wrapped line Problem: Wrong display with cpo+=$, matchparen and wrapped line. Solution: Use old cursor line height when scrolling with cpo+=$. Also fix wrong redraw in non-current window. (zeertzjq) fixes: #18647 closes: #18662 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/drawscreen.c | 24 +++++--- ...est_change_wrapped_line_cpo_dollar_01.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_02.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_03.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_04.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_05.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_06.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_07.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_08.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_09.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_10.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_11.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_12.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_13.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_14.dump | 10 +++ ...est_change_wrapped_line_cpo_dollar_15.dump | 10 +++ src/testdir/test_display.vim | 61 +++++++++++++++++++ src/version.c | 2 + 18 files changed, 229 insertions(+), 8 deletions(-) create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_01.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_02.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_03.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_04.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_05.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_06.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_07.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_08.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_09.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_10.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_11.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_12.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_13.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_14.dump create mode 100644 src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_15.dump diff --git a/src/drawscreen.c b/src/drawscreen.c index 3cd2514d50..7d3b3bd6ad 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2280,13 +2280,12 @@ win_update(win_T *wp) // When at start of changed lines: May scroll following lines // up or down to minimize redrawing. // Don't do this when the change continues until the end. - // Don't scroll when dollar_vcol >= 0, keep the "$". // Don't scroll when redrawing the top, scrolled already above. if (lnum == mod_top && mod_bot != MAXLNUM - && !(dollar_vcol >= 0 && mod_bot == mod_top + 1) && row >= top_end) { + int old_cline_height = 0; int old_rows = 0; int new_rows = 0; int xtra_rows; @@ -2302,6 +2301,8 @@ win_update(win_T *wp) if (wp->w_lines[i].wl_valid && wp->w_lines[i].wl_lnum == mod_bot) break; + if (wp->w_lines[i].wl_lnum == wp->w_cursor.lnum) + old_cline_height = wp->w_lines[i].wl_size; old_rows += wp->w_lines[i].wl_size; #ifdef FEAT_FOLDING if (wp->w_lines[i].wl_valid @@ -2332,11 +2333,16 @@ win_update(win_T *wp) j = idx; for (l = lnum; l < mod_bot; ++l) { + if (dollar_vcol >= 0 && wp == curwin && + old_cline_height > 0 && l == wp->w_cursor.lnum) + // When dollar_vcol >= 0, cursor line isn't fully + // redrawn, and its height remains unchanged. + new_rows += old_cline_height; #ifdef FEAT_FOLDING - if (hasFoldingWin(wp, l, NULL, &l, TRUE, NULL)) + else if (hasFoldingWin(wp, l, NULL, &l, TRUE, NULL)) ++new_rows; - else #endif + else new_rows += plines_correct_topline(wp, l, TRUE); ++j; if (new_rows > wp->w_height - row - 2) @@ -2504,18 +2510,20 @@ win_update(win_T *wp) wp->w_lines[idx].wl_lnum = lnum; wp->w_lines[idx].wl_valid = TRUE; + int is_curline = wp == curwin && lnum == wp->w_cursor.lnum; + // Past end of the window or end of the screen. Note that after // resizing wp->w_height may be end up too big. That's a problem // elsewhere, but prevent a crash here. if (row > wp->w_height || row + wp->w_winrow >= Rows) { // we may need the size of that too long line later on - if (dollar_vcol == -1) + if (dollar_vcol == -1 || !is_curline) wp->w_lines[idx].wl_size = plines_win(wp, lnum, TRUE); ++idx; break; } - if (dollar_vcol == -1) + if (dollar_vcol == -1 || !is_curline) wp->w_lines[idx].wl_size = row - srow; ++idx; #ifdef FEAT_FOLDING @@ -2706,7 +2714,7 @@ win_update(win_T *wp) } #endif } - else if (dollar_vcol == -1) + else if (dollar_vcol == -1 || wp != curwin) wp->w_botline = lnum; // Make sure the rest of the screen is blank. @@ -2731,7 +2739,7 @@ win_update(win_T *wp) wp->w_old_botfill = wp->w_botfill; #endif - if (dollar_vcol == -1) + if (dollar_vcol == -1 || wp != curwin) { // There is a trick with w_botline. If we invalidate it on each // change that might modify it, this will cause a lot of expensive diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_01.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_01.dump new file mode 100644 index 0000000000..ae2a2db63e --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_01.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +>x@21||+1&&|x+0&&@21 +@3|!@1|(|)|!@1|y@12||+1&&|x+0&&@2|!@1|(|)|!@1|y@12 +@12| @9||+1&&|y+0&&@11| @9 +|F|O@1| @18||+1&&|F+0&&|O@1| @18 +|B|A|R| @18||+1&&|B+0&&|A|R| @18 +|~+0#4040ff13&| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +| +0#0000000&@26|3|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_02.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_02.dump new file mode 100644 index 0000000000..e982416f36 --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_02.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +>x@21||+1&&|!+0&&@1|(|)|!@1|y@15 +|x@1|$|!@1|(|)|!@1|y@12||+1&&|y+0&&@8| @12 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|1|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_03.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_03.dump new file mode 100644 index 0000000000..d0d92a3b0c --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_03.dump @@ -0,0 +1,10 @@ +|z+0&#ffffff0@21||+1&&|z+0&&@21 +@8| @13||+1&&|z+0&&@7| @13 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +>x@21||+1&&|!+0&&@1|(|)|!@1|y@15 +|x@1|$|!@1|(|)|!@1|y@12||+1&&|y+0&&@8| @12 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|1|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_04.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_04.dump new file mode 100644 index 0000000000..d4e227296a --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_04.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y>x@20||+1&&|y+0&&|!@1|(|)|!@1|y@14 +|x@1|$|!@1|(|)|!@1|y@12||+1&&|y+0&&@9| @11 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|3|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_05.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_05.dump new file mode 100644 index 0000000000..85b53503d1 --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_05.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y@1>x@19||+1&&|y+0&&@1|!@1|(|)|!@1|y@13 +|x@1|$|!@1|(|)|!@1|y@12||+1&&|y+0&&@10| @10 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|3|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_06.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_06.dump new file mode 100644 index 0000000000..032a0ac612 --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_06.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y>y|!@1|(|)|!@1|y@13||+1&&|y+0&&@1|!@1|(|)|!@1|y@13 +@11| @10||+1&&|y+0&&@10| @10 +|F|O@1| @18||+1&&|F+0&&|O@1| @18 +|B|A|R| @18||+1&&|B+0&&|A|R| @18 +|~+0#4040ff13&| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +| +0#0000000&@26|3|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_07.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_07.dump new file mode 100644 index 0000000000..c05edb3aad --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_07.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +>x@21||+1&&|(+0&&|)|!@1|y@17 +|x@2|!|$|(|)|!@1|y@12||+1&&|y+0&&@6| @14 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|1|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_08.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_08.dump new file mode 100644 index 0000000000..5d0c62fa27 --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_08.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y>x@20||+1&&|y+0&&|(|)|!@1|y@16 +|x@2|!|$|(|)|!@1|y@12||+1&&|y+0&&@7| @13 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|3|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_09.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_09.dump new file mode 100644 index 0000000000..be9fb35bd2 --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_09.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y@1>x@19||+1&&|y+0&&@1|(|)|!@1|y@15 +|x@2|!|$|(|)|!@1|y@12||+1&&|y+0&&@8| @12 +|y@11| @9||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|3|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_10.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_10.dump new file mode 100644 index 0000000000..994d6aa68f --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_10.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y>y|(|)|!@1|y@15||+1&&|y+0&&@1|(|)|!@1|y@15 +@9| @12||+1&&|y+0&&@8| @12 +|F|O@1| @18||+1&&|F+0&&|O@1| @18 +|B|A|R| @18||+1&&|B+0&&|A|R| @18 +|~+0#4040ff13&| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +| +0#0000000&@26|3|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_11.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_11.dump new file mode 100644 index 0000000000..5425edeb02 --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_11.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +>x@21||+1&&|x+0&&@21 +@3|!@1|(|z@1| @13||+1&&|x+0&&@2|!@1|(|z@1| @13 +|z@1|)|!@1|y@16||+1&&|z+0&&@1|)|!@1|y@16 +@8| @13||+1&&|y+0&&@7| @13 +|F|O@1| @18||+1&&|F+0&&|O@1| @18 +|B|A|R| @18||+1&&|B+0&&|A|R| @18 +|~+0#4040ff13&| @20||+1#0000000&|~+0#4040ff13&| @20 +| +0#0000000&@26|3|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_12.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_12.dump new file mode 100644 index 0000000000..f8a4f6393b --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_12.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +>x@21||+1&&|(+0&&|z@1| @18 +|x@2|!|$|(|z@1| @13||+1&&|z+0&&@1|)|!@1|y@16 +|z@1|)|!@1|y@16||+1&&|y+0&&@7| @13 +|y@7| @13||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|1|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_13.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_13.dump new file mode 100644 index 0000000000..97efe45efd --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_13.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y>x@20||+1&&|y+0&&|(|z@1| @17 +|x@2|!|$|(|z@1| @13||+1&&|z+0&&@1|)|!@1|y@16 +|z@1|)|!@1|y@16||+1&&|y+0&&@7| @13 +|y@7| @13||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|3|,|2| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_14.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_14.dump new file mode 100644 index 0000000000..2ac0f3fe7c --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_14.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y@1>x@19||+1&&|y+0&&@1|(|z@1| @16 +|x@2|!|$|(|z@1| @13||+1&&|z+0&&@1|)|!@1|y@16 +|z@1|)|!@1|y@16||+1&&|y+0&&@7| @13 +|y@7| @13||+1&&|F+0&&|O@1| @18 +|F|O@1| @18||+1&&|B+0&&|A|R| @18 +|B|A|R| @18||+1&&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@14|3|,|3| @10|A|l@1| diff --git a/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_15.dump b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_15.dump new file mode 100644 index 0000000000..d0ea538eab --- /dev/null +++ b/src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_15.dump @@ -0,0 +1,10 @@ +|f+0&#ffffff0|o@1| @18||+1&&|f+0&&|o@1| @18 +|b|a|r| @18||+1&&|b+0&&|a|r| @18 +|y>y|(|z@1| @16||+1&&|y+0&&@1|(|z@1| @16 +|z@1|)|!@1|y@16||+1&&|z+0&&@1|)|!@1|y@16 +@8| @13||+1&&|y+0&&@7| @13 +|F|O@1| @18||+1&&|F+0&&|O@1| @18 +|B|A|R| @18||+1&&|B+0&&|A|R| @18 +|~+0#4040ff13&| @20||+1#0000000&|~+0#4040ff13&| @20 +|~| @20||+1#0000000&|~+0#4040ff13&| @20 +| +0#0000000&@26|3|,|2| @10|A|l@1| diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim index 698b6a6b61..3a3632a196 100644 --- a/src/testdir/test_display.vim +++ b/src/testdir/test_display.vim @@ -572,4 +572,65 @@ func Test_display_cursor_long_line() call StopVimInTerminal(buf) endfunc +func Test_change_wrapped_line_cpo_dollar() + CheckScreendump + + let lines =<< trim END + set cpoptions+=$ laststatus=0 + call setline(1, ['foo', 'bar', + \ repeat('x', 25) .. '!!()!!' .. repeat('y', 25), + \ 'FOO', 'BAR']) + inoremap call setline(1, repeat('z', 30)) + inoremap call setline(1, 'foo') + vsplit + call cursor(3, 1) + END + call writefile(lines, 'Xwrapped_cpo_dollar', 'D') + let buf = RunVimInTerminal('-S Xwrapped_cpo_dollar', #{rows: 10, cols: 45}) + + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_01', {}) + call term_sendkeys(buf, 'ct!') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_02', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_03', {}) + call term_sendkeys(buf, "\") + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_02', {}) + call term_sendkeys(buf, 'y') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_04', {}) + call term_sendkeys(buf, 'y') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_05', {}) + call term_sendkeys(buf, "\") + call TermWait(buf, 50) + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_06', {}) + + call term_sendkeys(buf, ":silent undo | echo\") + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_01', {}) + call term_sendkeys(buf, ":source samples/matchparen.vim\") + call term_sendkeys(buf, 'ct(') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_07', {}) + call term_sendkeys(buf, 'y') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_08', {}) + call term_sendkeys(buf, 'y') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_09', {}) + call term_sendkeys(buf, "\") + call TermWait(buf, 50) + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_10', {}) + + call term_sendkeys(buf, ":silent undo | echo\") + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_01', {}) + call term_sendkeys(buf, "f(azz\zz\k0") + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_11', {}) + call term_sendkeys(buf, 'ct(') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_12', {}) + call term_sendkeys(buf, 'y') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_13', {}) + call term_sendkeys(buf, 'y') + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_14', {}) + call term_sendkeys(buf, "\") + call TermWait(buf, 50) + call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_15', {}) + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index efe1000867..ef98c1696e 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1888, /**/ 1887, /**/ From 8f551a70ad8f5cc2e3844f2418ef97330d3333bd Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 29 Oct 2025 20:20:10 +0000 Subject: [PATCH 03/54] runtime: regenerate helptags, update last-change header in tombi compiler Signed-off-by: Christian Brabandt --- runtime/compiler/tombi.vim | 2 +- runtime/doc/tags | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/compiler/tombi.vim b/runtime/compiler/tombi.vim index 1bf00044ec..7a286723cd 100644 --- a/runtime/compiler/tombi.vim +++ b/runtime/compiler/tombi.vim @@ -1,7 +1,7 @@ " Vim compiler file " Language: TOML " Maintainer: Konfekt -" Last Change: 2025 Oct 28 +" Last Change: 2025 Oct 29 if exists("current_compiler") | finish | endif let current_compiler = "tombi" diff --git a/runtime/doc/tags b/runtime/doc/tags index 6757a097a4..0fb8c021d7 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6761,8 +6761,8 @@ compiler-ruff quickfix.txt /*compiler-ruff* compiler-select quickfix.txt /*compiler-select* compiler-spotbugs quickfix.txt /*compiler-spotbugs* compiler-tex quickfix.txt /*compiler-tex* -compiler-tsc quickfix.txt /*compiler-tsc* compiler-tombi quickfix.txt /*compiler-tombi* +compiler-tsc quickfix.txt /*compiler-tsc* compiler-typst quickfix.txt /*compiler-typst* compiler-vaxada ft_ada.txt /*compiler-vaxada* compl-current insert.txt /*compl-current* From 4105ef16e363c45806773c5d4deddfa81aea7b81 Mon Sep 17 00:00:00 2001 From: Aliaksei Budavei <0x000c70@gmail.com> Date: Thu, 30 Oct 2025 19:05:03 +0000 Subject: [PATCH 04/54] Drop superfluous execute permissions for readable files - runtime/ftplugin/plsql.vim (42e498) - runtime/pack/dist/opt/editorconfig/LICENSE.PSF (e5e043) - src/po/check.vim (96dab9) - src/po/it.po (bb0d3b) closes: #18666 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt --- runtime/ftplugin/plsql.vim | 0 runtime/pack/dist/opt/editorconfig/LICENSE.PSF | 0 src/po/check.vim | 0 src/po/it.po | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 runtime/ftplugin/plsql.vim mode change 100755 => 100644 runtime/pack/dist/opt/editorconfig/LICENSE.PSF mode change 100755 => 100644 src/po/check.vim mode change 100755 => 100644 src/po/it.po diff --git a/runtime/ftplugin/plsql.vim b/runtime/ftplugin/plsql.vim old mode 100755 new mode 100644 diff --git a/runtime/pack/dist/opt/editorconfig/LICENSE.PSF b/runtime/pack/dist/opt/editorconfig/LICENSE.PSF old mode 100755 new mode 100644 diff --git a/src/po/check.vim b/src/po/check.vim old mode 100755 new mode 100644 diff --git a/src/po/it.po b/src/po/it.po old mode 100755 new mode 100644 From 69dd5906fd9723774715ec37ad3b44652938f655 Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Fri, 31 Oct 2025 09:03:04 +0000 Subject: [PATCH 05/54] patch 9.1.1889: filetype: not all AppleScript files are recognized Problem: filetype: not all AppleScript files are recognized Solution: Detect *.applescript files as applescript filetype (Samuel Huang) Reference: https://en.wikipedia.org/wiki/AppleScript closes: #18672 Signed-off-by: Samuel Huang Signed-off-by: Christian Brabandt --- runtime/autoload/dist/ft.vim | 3 ++- src/testdir/test_filetype.vim | 2 +- src/version.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 791dccf67c..88e81099e6 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -3,7 +3,7 @@ vim9script # Vim functions for file type detection # # Maintainer: The Vim Project -# Last Change: 2025 Oct 28 +# Last Change: 2025 Oct 31 # Former Maintainer: Bram Moolenaar # These functions are moved here from runtime/filetype.vim to make startup @@ -1659,6 +1659,7 @@ const ft_from_ext = { # XA65 MOS6510 cross assembler "a65": "a65", # Applescript + "applescript": "applescript", "scpt": "applescript", # Applix ELF "am": "elf", diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index f7d95082d8..31aa2b2d52 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -114,7 +114,7 @@ def s:GetFilenameChecks(): dict> apachestyle: ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'], apkbuild: ['APKBUILD'], - applescript: ['file.scpt'], + applescript: ['file.scpt', 'file.applescript'], aptconf: ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'], arch: ['.arch-inventory', '=tagging-method'], arduino: ['file.ino', 'file.pde'], diff --git a/src/version.c b/src/version.c index ef98c1696e..4e0477dd9f 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1889, /**/ 1888, /**/ From 73a0de4a04b48ccaa0291f91fb69606c66d7cf8c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 31 Oct 2025 09:10:05 +0000 Subject: [PATCH 06/54] patch 9.1.1890: %P in 'statusline' doesn't behave as documented Problem: %P in 'statusline' doesn't behave as documented (after 9.1.1479). Solution: Make the percentage 3-chars wide when not translated. (zeertzjq) fixes: #18669 closes: #18671 Co-authored-by: Christ van Willegen Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- src/buffer.c | 2 +- src/testdir/test_statusline.vim | 13 ++++++++++--- src/version.c | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/buffer.c b/src/buffer.c index 548df80516..6e4990abdf 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5430,7 +5430,7 @@ get_rel_pos( char tmp[8]; // localized percentage value vim_snprintf(tmp, sizeof(tmp), _("%d%%"), perc); - return (int)vim_snprintf_safelen((char *)buf, buflen, _("%2s"), tmp); + return (int)vim_snprintf_safelen((char *)buf, buflen, _("%3s"), tmp); } /* diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim index 9aa6aef664..4899bd0a05 100644 --- a/src/testdir/test_statusline.vim +++ b/src/testdir/test_statusline.vim @@ -168,9 +168,16 @@ func Test_statusline() call assert_match('^0,Top\s*$', s:get_statusline()) norm G call assert_match('^100,Bot\s*$', s:get_statusline()) - 9000 - " Don't check the exact percentage as it depends on the window size - call assert_match('^90,\(Top\|Bot\|\d\+%\)\s*$', s:get_statusline()) + " The exact percentage depends on the window height, so create a window with + " known height. + 9000 | botright 10split | setlocal scrolloff=0 | normal! zb + call assert_match('^90,89%\s*$', s:get_statusline()) + normal! zt + call assert_match('^90,90%\s*$', s:get_statusline()) + " %P should result in a string with 3 in length when not translated. + normal! 500zb + call assert_match('^5, 4%\s*$', s:get_statusline()) + close " %q: "[Quickfix List]", "[Location List]" or empty. set statusline=%q diff --git a/src/version.c b/src/version.c index 4e0477dd9f..5af88e6115 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1890, /**/ 1889, /**/ From 958393b0b48dd4a88f8e88d789d5dd5b571709ef Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 31 Oct 2025 09:16:19 +0000 Subject: [PATCH 07/54] translation: regenerate po/vim.pot after 73a0de4a04b48cca Signed-off-by: Christian Brabandt --- src/po/vim.pot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/po/vim.pot b/src/po/vim.pot index 411d5ca48a..ac1fe9a090 100644 --- a/src/po/vim.pot +++ b/src/po/vim.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Vim\n" "Report-Msgid-Bugs-To: vim-dev@vim.org\n" -"POT-Creation-Date: 2025-10-07 20:28+0000\n" +"POT-Creation-Date: 2025-10-31 09:13+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -154,7 +154,7 @@ msgid "%d%%" msgstr "" #, c-format -msgid "%2s" +msgid "%3s" msgstr "" #, c-format From adc85151f3c6a6cea4bb8c8da3465429fc120445 Mon Sep 17 00:00:00 2001 From: varsidry <240319857+varsidry@users.noreply.github.com> Date: Fri, 31 Oct 2025 16:16:11 +0000 Subject: [PATCH 08/54] patch 9.1.1891: g does not move to last non-blank in visual mode Problem: In visual mode, g does not move to the last non-blank character when the end of a line is on the same line as the cursor (after v9.0.1753) Solution: Move the cursor back by one position if it lands after the line (varsidry) fixes: #18657 closes: #18658 Signed-off-by: varsidry <240319857+varsidry@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/doc/index.txt | 5 +++-- src/normal.c | 2 +- src/testdir/test_normal.vim | 11 +++++++++++ src/version.c | 2 ++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 2966a6303f..0581a83699 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 9.1. Last change: 2025 Aug 06 +*index.txt* For Vim version 9.1. Last change: 2025 Oct 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -807,7 +807,8 @@ tag char note action in Normal mode ~ |g@| g@{motion} call 'operatorfunc' |g~| g~{motion} 2 swap case for Nmove text |g| g 1 same as "gj" -|g| g 1 same as "g$" +|g| g 1 same as "g$" but go to the rightmost + non-blank character instead |g| g 1 same as "g0" |g| g same as g same as diff --git a/src/normal.c b/src/normal.c index 63edaa964c..0f336a276d 100644 --- a/src/normal.c +++ b/src/normal.c @@ -5936,7 +5936,7 @@ nv_g_dollar_cmd(cmdarg_T *cap) { do i = gchar_cursor(); - while (VIM_ISWHITE(i) && oneleft() == OK); + while (IS_WHITE_OR_NUL(i) && oneleft() == OK); curwin->w_valid &= ~VALID_WCOL; } } diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim index 374696443d..58c1b97832 100644 --- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -4195,6 +4195,17 @@ func Test_normal33_g_cmd_nonblank() call assert_equal(20, col('.')) exe "normal 0g\" call assert_equal(11, col('.')) + + " Test visual mode at end of line + normal 0$bvg$y + call assert_equal(80, col("'>")) + exe "normal 0$bvg\y" + call assert_equal(71, col("'>")) + setlocal nowrap virtualedit=all + exe "normal 0$\llg\y" + call assert_equal(71, col("'<")) + exe "normal 0$llvg\y" + call assert_equal(71, col("'<")) bw! endfunc diff --git a/src/version.c b/src/version.c index 5af88e6115..df3adb3bb2 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1891, /**/ 1890, /**/ From 07da26710a798bab9e39d27783e968ae626280e6 Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Sat, 1 Nov 2025 15:24:12 +0000 Subject: [PATCH 09/54] runtime(doc): Fix a few typos closes: #18676 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- runtime/doc/mbyte.txt | 6 +++--- runtime/doc/wayland.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index ea545874c2..e7ca6da86d 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*mbyte.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -997,8 +997,8 @@ recommended to test with an alternative one. For proper integration with Vim's |+multi_byte_ime| system, changes in the input method's status must be detectable by the `ImmGetOpenStatus()` function -in Vims source code. Currently, some input methods that support multi-language -input may have internal state changes that gVim cannot capture. +in Vim's source code. Currently, some input methods that support +multi-language input may have internal state changes that gVim cannot capture. Cursor color when IME or XIM is on *CursorIM* diff --git a/runtime/doc/wayland.txt b/runtime/doc/wayland.txt index 300b9c5b96..9900d9ae35 100644 --- a/runtime/doc/wayland.txt +++ b/runtime/doc/wayland.txt @@ -1,4 +1,4 @@ -*wayland.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*wayland.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -73,7 +73,7 @@ selections, see |wayland-primary-selection| for more details. *wayland-persist* If you use X11 cut buffers, no such things exist on Wayland. Instead to emulate such functionality, a separate clipboard manager must be used in order -to persist selection data when a Wayland client exists. +to persist selection data when a Wayland client exits. *wayland-and-x11* If your version of Vim comes compiled with both X11 and Wayland support, then From 28f7582c16e7692cc56dbb7f240649086b5066d8 Mon Sep 17 00:00:00 2001 From: Mao-Yining Date: Sat, 1 Nov 2025 15:42:32 +0000 Subject: [PATCH 10/54] runtime(log): syntax file update closes: #18675 Signed-off-by: Mao-Yining Signed-off-by: Christian Brabandt --- runtime/syntax/log.vim | 279 +++++++++++++++++++++++++---------------- 1 file changed, 170 insertions(+), 109 deletions(-) diff --git a/runtime/syntax/log.vim b/runtime/syntax/log.vim index f1d70cfc3d..abf3d716c2 100644 --- a/runtime/syntax/log.vim +++ b/runtime/syntax/log.vim @@ -2,7 +2,7 @@ " Language: Generic log file " Maintainer: Mao-Yining " Former Maintainer: MTDL9 -" Latest Revision: 2025-10-03 +" Latest Revision: 2025-10-31 if exists('b:current_syntax') finish @@ -12,150 +12,211 @@ syntax case ignore " Operators "--------------------------------------------------------------------------- -syn match logOperator display '[;,\?\:\.\<=\>\~\/\@\!$\%&\+\-\|\^(){}\*#]' -syn match logBrackets display '[][]' -syn match logSeparator display '-\{3,}' -syn match logSeparator display '\*\{3,}' -syn match logSeparator display '=\{3,}' -syn match logSeparator display '- - ' +syn match logOperator display '[;,\?\:\.\<=\>\~\/\@\!$\%&\+\-\|\^(){}\*#]' +syn match logBrackets display '[][]' +" For Visual Separator and Apache CLF +"--------------------------------------------------------------------------- +syn match logSeparator display '-\{3,}\|=\{3,}\|#\{3,}\|\*\{3,}\|<\{3,}\|>\{3,}' +syn match logSeparator display '- - ' + +" Strings +" ------------------------------ +syn region LogString start=/"/ end=/"/ end=/$/ skip=/\\./ contains=logJavaError +syn region LogString start=/`/ end=/`/ end=/$/ skip=/\\./ contains=logJavaError +" Quoted strings, but no match on quotes like `don't`, possessive `s'` and `'s` +syn region LogString start=/\(s\)\@' +syn match logNumberFloat display '\<\d\+\.\d\+\([eE][-+]\=\d\+\)\=\>' +syn match logNumberFloat display '\<\d\+[eE][-+]\=\d\+\>' +syn match logNumberBin display '\<0[bB][01]\+\>' +syn match logNumberOct display '\<0[oO]\o\+\>' +syn match logNumberHex display '\<0[xX]\x\+\>' + +" Possible hex numbers without the '0x' prefix +syn match logNumberHex display '\<\x\{4,}\>' + +" Numbers in Hardware Description Languages e.g. Verilog +" These must be placed after LogString to ensure they take precedence +syn match logNumber display '\'d\d\+\>' +syn match logNumberBin display '\'b[01]\+\>' +syn match logNumberOct display '\'o\o\+\>' +syn match logNumberHex display '\'h\x\+\>' " Constants "--------------------------------------------------------------------------- -syn match logNumber '\<-\?\d\+\>' -syn match logHexNumber '\<0[xX]\x\+\>' -syn match logHexNumber '\<\d\x\+\>' -syn match logBinaryNumber '\<0[bB][01]\+\>' -syn match logFloatNumber '\<\d.\d\+[eE]\?\>' - -syn keyword logBoolean true false -syn keyword logNull null nil nullptr none - -syn region logString start=/"/ end=/"/ end=/$/ skip=/\\./ contains=logJavaError -" Quoted strings, but no match on quotes like "don't", "plurals' elements" -syn region logString start=/'\(s \|t \| \w\)\@!/ end=/'/ end=/$/ end=/s / skip=/\\./ contains=logJavaError - +syn keyword logBoolean true false +syn keyword logNull null nil none " Dates and Times "--------------------------------------------------------------------------- -" Matches 2018-03-12T or 12/03/2018 or 12/Mar/2018 or 27 Nov 2023 -syn match logDate '\d\{2,4}[-/ ]\(\d\{2}\|Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)[-/ ]\d\{2,4}T\?' -" Matches 8 digit numbers at start of line starting with 20 -syn match logDate '^20\d\{6}' -" Matches Fri Jan 09 or Feb 11 or Apr 3 or Sun 3 -syn keyword logDate Mon Tue Wed Thu Fri Sat Sun Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec nextgroup=logDateDay -syn match logDateDay '\s\{1,2}\d\{1,2}' contained - +" MM-DD, DD-MM, MM/DD, DD/MM +syn match logDate display '\<\d\{2}[-\/]\d\{2}\>' +" YYYY-MM-DD, YYYY/MM/DD +syn match logDate display '\<\d\{4}[-\/]\d\{2}[-\/]\d\{2}\>' +" DD-MM-YYYY, DD/MM/YYYY +syn match logDate display '\<\d\{2}[-\/]\d\{2}[-\/]\d\{4}\>' +" First half of RFC3339 e.g. 2023-01-01T +syn match logDate display '\<\d\{4}-\d\{2}-\d\{2}T' +" 'Dec 31', 'Dec 31, 2023', 'Dec 31 2023' +syn match logDate display '\<\a\{3} \d\{1,2}\(,\? \d\{4}\)\?\>' +" '31-Dec-2023', '31 Dec 2023' +syn match logDate display '\<\d\{1,2}[- ]\a\{3}[- ]\d\{4}\>' +" Weekday string +syn keyword logDate Mon Tue Wed Thu Fri Sat Sun " Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700 or 01:32:12.1234567890 or 21:14:18+11:00 -syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,9}\)\?\(\s\?[-+]\(\d\{1,2\}:\d\{2\}\|\d\{2,4}\)\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite +syn match logTime display '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,9}\)\?\(\s\?[-+]\(\d\{1,2\}:\d\{2\}\|\d\{2,4}\)\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite +" Time zone e.g. Z, +08:00, PST +syn match logTimeZone display 'Z\|[+-]\d\{2}:\d\{2}\|\a\{3}\>' contained skipwhite nextgroup=logSysColumns +" Matches time durations like 1ms or 1y 2d 23ns 3.14s 1.2e4s 3E+20h +syn match logDuration display '\(\(\(\d\+d\)\?\d\+h\)\?\d\+m\)\?\d\+\(\.\d\+\)\?[mun]\?s\>' -" Follows logTime, matches UTC or PDT 2019 or 2019 EDT -syn match logTimeZone '[A-Z]\{2,5}\>\( \d\{4}\)\?' contained -syn match logTimeZone '\d\{4} [A-Z]\{2,5}\>' contained - -" Matches time durations like 1ms or 1y 2d 23ns -syn match logDuration '\(^\|\s\)\@<=\d\+\s*[mn]\?[ywdhms]\(\s\|$\)\@=' - -" Entities +" Objects "--------------------------------------------------------------------------- -syn match logUrl 'http[s]\?:\/\/\S\+' -syn match logUUID '\w\{8}-\w\{4}-\w\{4}-\w\{4}-\w\{12}' -syn match logMD5 '\<[a-z0-9]\{32}\>' -syn match logIPV4 '\<\d\{1,3}\(\.\d\{1,3}\)\{3}\>' -syn match logIPV6 '\<\x\{1,4}\(:\x\{1,4}\)\{7}\>' -syn match logMacAddress '\<\x\{2}\(:\x\{2}\)\{5}' -syn match logFilePath '\<\w:\\\f\+' -syn match logFilePath '[^a-zA-Z0-9"']\@<=/\f\+' +syn match logUrl display '\' +syn match logIPv4 display '\<\d\{1,3}\(\.\d\{1,3}\)\{3}\(\/\d\+\)\?\>' +syn match logIPv6 display '\<\x\{1,4}\(:\x\{1,4}\)\{7}\(\/\d\+\)\?\>' +syn match logUUID display '\<\x\{8}-\x\{4}-\x\{4}-\x\{4}-\x\{12}\>' +syn match logMD5 display '\<\x\{32}\>' +syn match logSHA display '\<\(\x\{40}\|\x\{56}\|\x\{64}\|\x\{96}\|\x\{128}\)\>' + +" Only highlight a path which is at the start of a line, or preceded by a space +" or an equal sign (for env vars, e.g. PATH=/usr/bin) +" POSIX-style path e.g. '/var/log/system.log', './run.sh', '../a/b', '~/c'. +syn match logFilePath display '\(^\|\s\|=\)\zs\(\.\{0,2}\|\~\)\/\f\+\ze' +" Windows drive path e.g. 'C:\Users\Test' +syn match logFilePath display '\(^\|\s\|=\)\zs\a:\\\f\+\ze' +" Windows UNC path e.g. '\\server\share' +syn match logFilePath display '\(^\|\s\|=\)\zs\\\\\f\+\ze' " Java Errors "--------------------------------------------------------------------------- -syn match logJavaError '\%(\%(Error\|Exception\):\s*\)\zs\w.\{-}\ze\(\\n\|$\)' contained - +syn match logJavaError '\%(\%(Error\|Exception\):\s*\)\zs\w.\{-}\ze\(\\n\|$\)' contained " Syslog Columns "--------------------------------------------------------------------------- " Syslog hostname, program and process number columns -syn match logSysColumns '\w\(\w\|\.\|-\)\+ \(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,logSysProcess contained -syn match logSysProcess '\(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,logNumber,logBrackets contained - +syn match logSysColumns '\w\(\w\|\.\|-\)\+ \(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,@logLvs,LogSysProcess contained +syn match logSysProcess '\(\w\|\.\|-\)\+\(\[\d\+\]\)\?:' contains=logOperator,logNumber,logBrackets contained " XML Tags "--------------------------------------------------------------------------- " Simplified matches, not accurate with the spec to avoid false positives -syn match logXmlHeader // contains=logString,logXmlAttribute,logXmlNamespace -syn match logXmlDoctype /]*>/ contains=logString,logXmlAttribute,logXmlNamespace -syn match logXmlTag /<\/\?\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(\(\n\|\s\)\+\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(="[^"]*"\|='[^']*'\)\?\)*\s*\/\?>/ contains=logString,logXmlAttribute,logXmlNamespace -syn match logXmlAttribute contained "\w\+=" contains=logOperator -syn match logXmlAttribute contained "\(\n\|\s\)\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(=\)\?" contains=logXmlNamespace,logOperator -syn match logXmlNamespace contained "\(\w\|-\)\+:" contains=logOperator -syn region logXmlComment start=// -syn match logXmlCData // -syn match logXmlEntity /&#\?\w\+;/ - +syn match logXmlHeader // contains=logString,logXmlAttribute,logXmlNamespace +syn match logXmlDoctype /]*>/ contains=logString,logXmlAttribute,logXmlNamespace +syn match logXmlTag /<\/\?\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(\(\n\|\s\)\+\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(="[^"]*"\|='[^']*'\)\?\)*\s*\/\?>/ contains=logString,logXmlAttribute,logXmlNamespace +syn match logXmlAttribute contained "\w\+=" contains=logOperator +syn match logXmlAttribute contained "\(\n\|\s\)\(\(\w\|-\)\+:\)\?\(\w\|-\)\+\(=\)\?" contains=logXmlNamespace,logOperator +syn match logXmlNamespace contained "\(\w\|-\)\+:" contains=logOperator +syn region logXmlComment start=// +syn match logXmlCData // +syn match logXmlEntity /&#\?\w\+;/ " Levels "--------------------------------------------------------------------------- -syn keyword logLevelEmergency EMERGENCY EMERG -syn keyword logLevelAlert ALERT -syn keyword logLevelCritical CRITICAL CRIT FATAL -syn keyword logLevelError ERROR ERR FAILURE SEVERE -syn keyword logLevelWarning WARNING WARN -syn keyword logLevelNotice NOTICE -syn keyword logLevelInfo INFO -syn keyword logLevelDebug DEBUG FINE -syn keyword logLevelTrace TRACE FINER FINEST +syn keyword logLvFatal FATAL Fatal fatal +syn keyword logLvEmergency EMERG[ENCY] Emerg[ency] emerg[ency] +syn keyword logLvAlert ALERT Alert alert +syn keyword logLvCritical CRIT[ICAL] Crit[ical] crit[ical] +syn keyword logLvError E ERR[ORS] Err[ors] err[ors] +syn keyword logLvFail F FAIL[ED] Fail[ed] fail[ed] FAILURE Failure failure +syn keyword logLvFault FAULT Fault fault +syn keyword logLvNack NACK Nack nack NAK Nak nak +syn keyword logLvWarning W WARN[ING] Warn[ing] warn[ing] +syn keyword logLvBad BAD Bad bad +syn keyword logLvNotice NOTICE Notice notice +syn keyword logLvInfo I INFO Info info +syn keyword logLvDebug D DEBUG Debug debug DBG Dbg dbg +syn keyword logLvTrace TRACE Trace trace +syn keyword logLvVerbose V VERBOSE Verbose verbose +syn keyword logLvPass PASS[ED] Pass[ed] pass[ed] +syn keyword logLvSuccess SUCCEED[ED] Succeed[ed] succeed[ed] SUCCESS Success success +" Composite log levels e.g. *_INFO +syn match logLvFatal display '\<\u\+_FATAL\>' +syn match logLvEmergency display '\<\u\+_EMERG\(ENCY\)\?\>' +syn match logLvAlert display '\<\u\+_ALERT\>' +syn match logLvCritical display '\<\u\+_CRIT\(ICAL\)\?\>' +syn match logLvError display '\<\u\+_ERR\(OR\)\?\>' +syn match logLvFail display '\<\u\+_FAIL\(URE\)\?\>' +syn match logLvWarning display '\<\u\+_WARN\(ING\)\?\>' +syn match logLvNotice display '\<\u\+_NOTICE\>' +syn match logLvInfo display '\<\u\+_INFO\>' +syn match logLvDebug display '\<\u\+_DEBUG\>' +syn match logLvTrace display '\<\u\+_TRACE\>' + +syn cluster logLvs contains=LogLvFatal,LogLvEmergency,LogLvAlert,LogLvCritical,LogLvError,LogLvFail,LogLvFault,LogLvNack,LogLvWarning,LogLvBad,LogLvNotice,LogLvInfo,LogLvDebug,LogLvTrace,LogLvVerbose,LogLvPass,LogLvSuccess " Highlight links "--------------------------------------------------------------------------- -hi def link logNumber Number -hi def link logHexNumber Number -hi def link logBinaryNumber Number -hi def link logFloatNumber Float -hi def link logBoolean Boolean -hi def link logNull Constant -hi def link logString String +hi def link logNumber Number +hi def link logNumberHex Number +hi def link logNumberBin Number +hi def link logNumberOct Number +hi def link logNumberFloat Float -hi def link logDate Identifier -hi def link logDateDay Identifier -hi def link logTime Function -hi def link logTimeZone Identifier -hi def link logDuration Identifier +hi def link logBoolean Boolean +hi def link logNull Constant +hi def link logString String -hi def link logUrl Underlined -hi def link logUUID Label -hi def link logMD5 Label -hi def link logIPV4 Label -hi def link logIPV6 ErrorMsg -hi def link logMacAddress Label -hi def link logFilePath Conditional +hi def link logDate Type +hi def link logTime Operator +hi def link logTimeZone Operator +hi def link logDuration Operator -hi def link logJavaError ErrorMsg +hi def link logUrl Underlined +hi def link logIPV4 Underlined +hi def link logIPV6 Underlined +hi def link logMacAddress Underlined +hi def link logUUID Label +hi def link logMD5 Label +hi def link logSHA Label +hi def link logFilePath Structure -hi def link logSysColumns Conditional -hi def link logSysProcess Include +hi def link logJavaError ErrorMsg -hi def link logXmlHeader Function -hi def link logXmlDoctype Function -hi def link logXmlTag Identifier +hi def link logSysColumns Statement +hi def link logSysProcess Function + +hi def link logXmlHeader Function +hi def link logXmlDoctype Function +hi def link logXmlTag Identifier hi def link logXmlAttribute Type hi def link logXmlNamespace Include -hi def link logXmlComment Comment -hi def link logXmlCData String -hi def link logXmlEntity Special +hi def link logXmlComment Comment +hi def link logXmlCData String +hi def link logXmlEntity Special -hi def link logOperator Operator -hi def link logBrackets Comment -hi def link logSeparator Comment +hi def link logOperator Special +hi def link logBrackets Special +hi def link logSeparator Comment + +hi def link LogLvFatal ErrorMsg +hi def link LogLvEmergency ErrorMsg +hi def link LogLvAlert ErrorMsg +hi def link LogLvCritical ErrorMsg +hi def link LogLvError ErrorMsg +hi def link LogLvFail ErrorMsg +hi def link LogLvFault ErrorMsg +hi def link LogLvNack ErrorMsg +hi def link LogLvWarning WarningMsg +hi def link LogLvBad WarningMsg +hi def link LogLvNotice Exception +hi def link LogLvInfo LogBlue +hi def link LogLvDebug Debug +hi def link LogLvTrace Special +hi def link LogLvVerbose Special +hi def link LogLvPass LogGreen +hi def link LogLvSuccess LogGreen + +" Custom highlight group +" ------------------------------ +hi logGreen ctermfg=lightgreen guifg=#a4c672 +hi logBlue ctermfg=lightblue guifg=#92bcfc -hi def link logLevelEmergency ErrorMsg -hi def link logLevelAlert ErrorMsg -hi def link logLevelCritical ErrorMsg -hi def link logLevelError ErrorMsg -hi def link logLevelWarning WarningMsg -hi def link logLevelNotice Character -hi def link logLevelInfo Repeat -hi def link logLevelDebug Debug -hi def link logLevelTrace Comment let b:current_syntax = 'log' From fe71c56d8fb6b5a51d1f7f6d54d658ef17a98713 Mon Sep 17 00:00:00 2001 From: Mohammad Reza Karimi Date: Sat, 1 Nov 2025 15:46:04 +0000 Subject: [PATCH 11/54] runtime(netrw): NetrwChgPerm for files not in cwd Problem: Changing permissions fail when using `gp` if the file under the cursor is not in the current working directory. Solution: Use the already available `a:curdir` argument and prepend it to the ``, so that the path of the file is correct. This commit also refactors some leftover `netrw#ErrorMsg` to `netrw#msg#Notify` (the main refactoring was done in f5e3b5c04f85b0f69cd2aae81e4938cfb191a790). closes: #18674 Signed-off-by: Mohammad Reza Karimi Signed-off-by: Christian Brabandt --- runtime/pack/dist/opt/netrw/autoload/netrw.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim index 37adbf9209..dcf8a365f2 100644 --- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim +++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim @@ -12,6 +12,7 @@ " 2025 Oct 01 by Vim Project fix navigate to parent folder #18464 " 2025 Oct 26 by Vim Project fix parsing of remote user names #18611 " 2025 Oct 27 by Vim Project align comment after #18611 +" 2025 Nov 01 by Vim Project fix NetrwChgPerm #18674 " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -4211,11 +4212,12 @@ function s:NetrwChgPerm(islocal,curdir) call inputsave() let newperm= input("Enter new permission: ") call inputrestore() - let chgperm= substitute(g:netrw_chgperm,'\',netrw#os#Escape(expand("")),'') + let fullpath = fnamemodify(netrw#fs#PathJoin(a:curdir, expand("")), ':p') + let chgperm= substitute(g:netrw_chgperm,'\',netrw#os#Escape(fullpath),'') let chgperm= substitute(chgperm,'\',netrw#os#Escape(newperm),'') call system(chgperm) if v:shell_error != 0 - NetrwKeepj call netrw#ErrorMsg(1,"changing permission on file<".expand("")."> seems to have failed",75) + NetrwKeepj call netrw#msg#Notify('WARNING', printf('changing permission on file<%s> seems to have failed', fullpath)) endif if a:islocal NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./',0)) @@ -4591,7 +4593,7 @@ function s:NetrwServerEdit(islocal,fname) endif else - call netrw#ErrorMsg(s:ERROR,"you need a gui-capable vim and client-server to use ",98) + call netrw#msg#Notify('ERROR', 'you need a gui-capable vim and client-server to use ') endif endfunction From 294bce21ee837aab209a1008d0efc3e305cf188f Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Sat, 1 Nov 2025 15:54:35 +0000 Subject: [PATCH 12/54] patch 9.1.1892: Not possible to know once Vim is done with sourcing vimrc Problem: A plugin does not know when startup scripts were already triggered. This is useful to determine if a function is called inside vimrc or after (like when sourcing 'plugin/' files). Solution: Add the v:vim_did_init variable (Evgeni Chasnovski) closes: #18668 Signed-off-by: Evgeni Chasnovski Signed-off-by: Christian Brabandt --- runtime/doc/eval.txt | 6 +++++- runtime/doc/repeat.txt | 8 +++++++- runtime/doc/starting.txt | 5 ++++- runtime/doc/tags | 2 ++ runtime/doc/version9.txt | 3 ++- runtime/syntax/vim.vim | 4 ++-- src/evalvars.c | 1 + src/main.c | 4 ++++ src/testdir/test_startup.vim | 30 ++++++++++++++++++++++++++++++ src/version.c | 2 ++ src/vim.h | 3 ++- 11 files changed, 61 insertions(+), 7 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 9140ff2359..b4b28e80cc 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*eval.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2988,6 +2988,10 @@ v:versionlong Like v:version, but also including the patchlevel in the last v:vim_did_enter Zero until most of startup is done. It is set to one just before |VimEnter| autocommands are triggered. + *v:vim_did_init* *vim_did_init-variable* +v:vim_did_init Zero until initialization is done. It is set to one just + after |vimrc| is sourced and before |load-plugins|. + *v:warningmsg* *warningmsg-variable* v:warningmsg Last given warning message. It's allowed to set this variable. diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index d1b2012ced..79b293c576 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 9.1. Last change: 2025 Oct 13 +*repeat.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -328,6 +328,12 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. you will need to write `filetype plugin indent on` AFTER all `packadd!` commands. + To programmatically decide if `!` is needed during + startup, check |v:vim_did_init|: use `!` if 0 (to not + duplicate |load-plugins| step), no `!` otherwise (to + force load plugin files as otherwise they won't be + loaded automatically). + Also see |pack-add|. {only available when compiled with |+eval|} diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index ec18a96dc0..7f718d7b6d 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*starting.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -843,6 +843,9 @@ accordingly. Vim proceeds in this order: If Vim was started in Ex mode with the "-s" argument, all following initializations until 4. are skipped. Only the "-u" option is interpreted. + + The |v:vim_did_init| variable is set to 1 after this step is finished. + *evim.vim* a. If Vim was started as |evim| or |eview| or with the |-y| argument, the script $VIMRUNTIME/evim.vim will be loaded. diff --git a/runtime/doc/tags b/runtime/doc/tags index 0fb8c021d7..3a35834216 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -11360,6 +11360,7 @@ v:var eval.txt /*v:var* v:version eval.txt /*v:version* v:versionlong eval.txt /*v:versionlong* v:vim_did_enter eval.txt /*v:vim_did_enter* +v:vim_did_init eval.txt /*v:vim_did_init* v:warningmsg eval.txt /*v:warningmsg* v:wayland_display eval.txt /*v:wayland_display* v:windowid eval.txt /*v:windowid* @@ -11634,6 +11635,7 @@ vim: options.txt /*vim:* vim_announce intro.txt /*vim_announce* vim_dev intro.txt /*vim_dev* vim_did_enter-variable eval.txt /*vim_did_enter-variable* +vim_did_init-variable eval.txt /*vim_did_init-variable* vim_mac intro.txt /*vim_mac* vim_starting builtin.txt /*vim_starting* vim_use intro.txt /*vim_use* diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index f40fe49fca..23f4bed554 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*version9.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41908,6 +41908,7 @@ Vim Variables: ~ |v:termda1| The escape sequence returned for the primary device attribute query (DA1). |v:termosc| The most recent received OSC response. +|v:vim_did_init| Set once Vim finishes startup initialization. |v:wayland_display| The name of the Wayland display Vim is connected to. Vim Arguments: ~ diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 19d2a8d50d..4f0a148618 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Oct 27 +" Last Change: 2025 Nov 01 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -166,7 +166,7 @@ syn keyword vimFuncName contained win_execute win_findbuf win_getid win_gettype " Predefined variable names {{{2 " GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR='' syn keyword vimVimVarName contained count count1 prevcount errmsg warningmsg statusmsg shell_error this_session version lnum termresponse fname lang lc_time ctype charconvert_from charconvert_to fname_in fname_out fname_new fname_diff cmdarg foldstart foldend folddashes foldlevel progname servername dying exception throwpoint register cmdbang insertmode val key profiling fcs_reason fcs_choice beval_bufnr beval_winnr beval_winid beval_lnum beval_col beval_text scrollstart swapname swapchoice swapcommand char mouse_win mouse_winid mouse_lnum mouse_col operator searchforward hlsearch oldfiles windowid progpath completed_item option_new option_old option_oldlocal option_oldglobal option_command option_type errors false true none null numbermax numbermin numbersize -syn keyword vimVimVarName contained vim_did_enter testing t_number t_string t_func t_list t_dict t_float t_bool t_none t_job t_channel t_blob t_class t_object termrfgresp termrbgresp termu7resp termstyleresp termblinkresp event versionlong echospace argv collate exiting colornames sizeofint sizeoflong sizeofpointer maxcol python3_version t_typealias t_enum t_enumvalue stacktrace t_tuple wayland_display clipmethod termda1 termosc +syn keyword vimVimVarName contained vim_did_enter testing t_number t_string t_func t_list t_dict t_float t_bool t_none t_job t_channel t_blob t_class t_object termrfgresp termrbgresp termu7resp termstyleresp termblinkresp event versionlong echospace argv collate exiting colornames sizeofint sizeoflong sizeofpointer maxcol python3_version t_typealias t_enum t_enumvalue stacktrace t_tuple wayland_display clipmethod termda1 termosc vim_did_init "--- syntax here and above generated by runtime/syntax/generator/gen_syntax_vim.vim --- diff --git a/src/evalvars.c b/src/evalvars.c index c840d872bd..2acfc429a5 100644 --- a/src/evalvars.c +++ b/src/evalvars.c @@ -167,6 +167,7 @@ static struct vimvar {VV_NAME("clipmethod", VAR_STRING), NULL, VV_RO}, {VV_NAME("termda1", VAR_STRING), NULL, VV_RO}, {VV_NAME("termosc", VAR_STRING), NULL, VV_RO}, + {VV_NAME("vim_did_init", VAR_NUMBER), NULL, VV_RO}, }; // shorthand diff --git a/src/main.c b/src/main.c index d3730fe10b..ba5b5b7d83 100644 --- a/src/main.c +++ b/src/main.c @@ -433,6 +433,10 @@ main // Source startup scripts. source_startup_scripts(¶ms); +#ifdef FEAT_EVAL + set_vim_var_nr(VV_VIM_DID_INIT, 1L); +#endif + #ifdef FEAT_MZSCHEME /* * Newer version of MzScheme (Racket) require earlier (trampolined) diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 02d1adf140..6693a76b4a 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -71,6 +71,36 @@ func Test_after_comes_later() call delete('Xsequence') endfunc +func Test_vim_did_init() + let before =<< trim [CODE] + set nocp viminfo+=nviminfo + set guioptions+=M + set loadplugins + set rtp=Xhere + set nomore + [CODE] + + let after =<< trim [CODE] + redir! > Xtestout + echo g:var_vimrc + echo g:var_plugin + redir END + quit + [CODE] + + call writefile(['let g:var_vimrc=v:vim_did_init'], 'Xvimrc', 'D') + call mkdir('Xhere/plugin', 'pR') + call writefile(['let g:var_plugin=v:vim_did_init'], 'Xhere/plugin/here.vim') + + if RunVim(before, after, '-u Xvimrc') + let lines = readfile('Xtestout') + call assert_equal('0', lines[1]) + call assert_equal('1', lines[2]) + endif + + call delete('Xtestout') +endfunc + func Test_pack_in_rtp_when_plugins_run() CheckFeature packages let before =<< trim [CODE] diff --git a/src/version.c b/src/version.c index df3adb3bb2..ff8121c4fd 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1892, /**/ 1891, /**/ diff --git a/src/vim.h b/src/vim.h index 83521b9efc..1ca6112e63 100644 --- a/src/vim.h +++ b/src/vim.h @@ -2256,7 +2256,8 @@ typedef int sock_T; #define VV_CLIPMETHOD 113 #define VV_TERMDA1 114 #define VV_TERMOSC 115 -#define VV_LEN 116 // number of v: vars +#define VV_VIM_DID_INIT 116 +#define VV_LEN 117 // number of v: vars // used for v_number in VAR_BOOL and VAR_SPECIAL #define VVAL_FALSE 0L // VAR_BOOL From 0405665638052ca1180bdb2855237cd1868526a3 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 1 Nov 2025 16:15:39 +0000 Subject: [PATCH 13/54] patch 9.1.1893: ICCF charity will dissolve Problem: ICCF charity will dissolve Solution: Update references to Kuwasha Since the ICCF[1] will be dissolved and handing over to the Kuwasha charity to continue supporting the Kibaale Children Center in Uganda, update the uganda.txt help file. [1]: https://groups.google.com/g/vim_announce/c/pUNbNXBLbKw/m/-zFUd4JjAQAJ fixes: #18584 closes: #18667 Signed-off-by: Signed-off-by: Christian Brabandt --- runtime/doc/help.txt | 4 +- runtime/doc/sponsor.txt | 83 ++++------------------------ runtime/doc/tags | 4 +- runtime/doc/uganda.txt | 97 ++++++++++++--------------------- runtime/doc/usr_01.txt | 4 +- runtime/doc/version9.txt | 7 ++- src/po/vim.pot | 4 +- src/testdir/test_window_cmd.vim | 12 ++-- src/version.c | 6 +- 9 files changed, 71 insertions(+), 150 deletions(-) diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index e8f15c737a..5391d2d649 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 9.1. Last change: 2025 Jun 27 +*help.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM - main help file k @@ -44,7 +44,7 @@ BASIC: |quickref| Overview of the most common commands you will use |tutor| 30-minute interactive course for beginners |copying| About copyrights -|iccf| Helping poor children in Uganda +|Kuwasha| Helping poor children in Uganda |sponsor| Sponsor Vim development, become a registered Vim user |www| Vim on the World Wide Web |bugs| Where to send bug reports diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index 6aaa906992..4222160028 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -1,4 +1,4 @@ -*sponsor.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*sponsor.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -22,30 +22,6 @@ For the most recent information about sponsoring look on the Vim web site: More explanations can be found in the |sponsor-faq|. -REGISTERED VIM USER *register* - -You can become a registered Vim user by sending at least 10 euro. This works -similar to sponsoring Vim, see |sponsor| above. Registration was made -possible for the situation where your boss or bookkeeper may be willing to -register software, but does not like the terms "sponsoring" and "donation". - -More explanations can be found in the |register-faq|. - - -VOTE FOR FEATURES *vote-for-features* - -Note: Voting for features has been discontinued since the passing of |Bram| in -2023. The following two links still work, but they are no longer updated. So -they now only provide a historic view as of summer 2023. - -The voting results appear on the results page, which is visible for everybody: -http://www.vim.org/sponsor/vote_results.php - -Additionally, once you have sent 100 euro or more in total, your name appears -in the "Vim hall of honour": http://www.vim.org/sponsor/hall_of_honour.php -But only if you enable this on your account page. - - HOW TO SEND MONEY *send-money* Credit card Through PayPal, see the PayPal site for information: @@ -58,77 +34,45 @@ Credit card Through PayPal, see the PayPal site for information: In Euro countries a bank transfer is preferred, this has lower costs. -Other methods See |iccf-donations|. +Other methods See |donate|. Include "Vim sponsor" or "Vim registration" in the comment of your money transfer. QUESTIONS AND ANSWERS *sponsor-faq* *register-faq* -Why should I give money? +Why should I give money?~ If you do not show your appreciation for Vim, the development team will be less motivated to fix bugs and add new features. They will do something else instead. -How much money should I send? +How much money should I send?~ That is up to you. The more you give, the more children will be helped. An indication for individuals that use Vim at home: 10 Euro per year. For professional use: 30 Euro per year per person. -How do I become a Vim sponsor or registered Vim user? - -Send money, as explained above |send-money| and include your e-mail address. -When the money has been received you will receive a unique registration key. -This key can be used on the Vim website to get an extra page where you can -choose whether others will be able to see that you donated. There is a link -to this page on your "My Account" page. - - -What is the difference between sponsoring and registering? - -It has a different name. Use the term "registration" if your boss doesn't -like "sponsoring" or "donation". The benefits are the same. - - -How can I send money? +How can I send money?~ See |send-money|. Check the web site for the most recent information: http://www.vim.org/sponsor/ -Why don't you use the SourceForge donation system? - -SourceForge takes 5% of the donations for themselves. If you want to support -SourceForge you can send money to them directly. - - -I cannot afford to send money, may I still use Vim? +I cannot afford to send money, may I still use Vim?~ Yes. -I did not register Vim, can I use all available features? - -Yes. - - -I noticed a bug, do I need to register before I can report it? - -No, suggestions for improving Vim can always be given. For improvements use -the developer |maillist|, for reporting bugs see |bugs|. - - -How about Charityware? +How about Charityware?~ Currently the Vim donations go to |uganda| anyway. Thus it doesn't matter if -you sponsor Vim or ICCF. +you sponsor Vim or Kuwasha. -I donated $$$, now please add feature XYZ! +I donated $$$, now please add feature XYZ!~ There is no direct relation between your donation and the work developers do. Otherwise you would be paying for work and we would have to pay tax over the @@ -136,15 +80,12 @@ donation. If you want to hire one of the developers for specific work, contact them directly, don't use the donation system. -Are the donations tax deductible? +Are the donations tax deductible?~ -That depends on your country. The donations to help the children in |Uganda| -are tax deductible in Holland, Germany, Canada and in the USA. See the ICCF -website https://iccf-holland.org/donate.html (Note: this process is currently -undergoing some changes and will be done differently in the future). +Possibly. Please refer to |Kuwasha| for this question. -Can you send me a bill? +Can you send me a bill?~ No, because there is no relation between the money you send and the work that is done. But a receipt is possible. diff --git a/runtime/doc/tags b/runtime/doc/tags index 3a35834216..8fd8cbae16 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -5739,6 +5739,7 @@ KVim gui_x11.txt /*KVim* KeyInputPre autocmd.txt /*KeyInputPre* Kibaale uganda.txt /*Kibaale* Korean mbyte.txt /*Korean* +Kuwasha uganda.txt /*Kuwasha* L motion.txt /*L* Linux-backspace options.txt /*Linux-backspace* List eval.txt /*List* @@ -8598,7 +8599,6 @@ i` motion.txt /*i`* ia64.vim syntax.txt /*ia64.vim* ib motion.txt /*ib* iccf uganda.txt /*iccf* -iccf-donations uganda.txt /*iccf-donations* icon-changed version4.txt /*icon-changed* iconise starting.txt /*iconise* iconize starting.txt /*iconize* @@ -10023,7 +10023,6 @@ reg_executing() builtin.txt /*reg_executing()* reg_recording() builtin.txt /*reg_recording()* regexp pattern.txt /*regexp* regexp-changes-5.4 version5.txt /*regexp-changes-5.4* -register sponsor.txt /*register* register-faq sponsor.txt /*register-faq* register-functions usr_41.txt /*register-functions* register-variable eval.txt /*register-variable* @@ -11707,7 +11706,6 @@ vms-notes os_vms.txt /*vms-notes* vms-problems os_vms.txt /*vms-problems* vms-started os_vms.txt /*vms-started* vms-usage os_vms.txt /*vms-usage* -vote-for-features sponsor.txt /*vote-for-features* votes-for-changes todo.txt /*votes-for-changes* vreplace-mode insert.txt /*vreplace-mode* vt100-cursor-keys term.txt /*vt100-cursor-keys* diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index 1abc2bd3ea..47ae640e52 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -1,4 +1,4 @@ -*uganda.txt* For Vim version 9.1. Last change: 2025 Aug 10 +*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -6,18 +6,30 @@ *uganda* *Uganda* *copying* *copyright* *license* SUMMARY - *iccf* *ICCF* + *Kuwasha* Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation for needy children in Uganda. Please see |kcc| -below or visit the ICCF web site, available at these URLs: +below or visit the Kuwasha web site, available at the following URL: - https://iccf-holland.org/ - https://www.vim.org/iccf/ - https://www.iccf.nl/ + https://www.kuwasha.net You can also sponsor the development of Vim, see |sponsor|. The money goes to Uganda anyway. + *iccf* *ICCF* +ICCF Holland and Kuwasha~ + +|Bram| Moolenaar's charity, ICCF Holland, has long supported the education of +children in Uganda through the Kibaale Children's Centre. Following Bram's +passing in 2023, ICCF Holland transfered all activities to its sister charity +Kuwasha in Canada and dissolved at the end of 2025. + +Donations from Vim users are still welcome and will continue to go directly to +Uganda. To continue supporting this cause, please send contributions to +Kuwasha. + +License~ + The Open Publication License applies to the Vim documentation, see |manual-copyright|. @@ -185,84 +197,43 @@ medical help. Since 2020 a maternity ward was added and 24/7 service is available. When needed, transport to a hospital is offered. Immunization programs are carried out and help is provided when an epidemic is breaking out (measles and cholera have been a problem). - *donate* -Summer 1994 to summer 1995 I spent a whole year at the centre, working as a -volunteer. I have helped to expand the centre and worked in the area of water -and sanitation. I learned that the help that the KCC provides really helps. -When I came back to Holland, I wanted to continue supporting KCC. To do this -I'm raising funds and organizing the sponsorship program. Please consider one -of these possibilities: -1. Sponsor a child in primary school: 17 euro a month (or more). -2. Sponsor a child in secondary school: 25 euro a month (or more). -3. Sponsor the clinic: Any amount a month or quarter -4. A one-time donation +Summer 1994 to summer 1995 Bram spent a whole year at the centre, working as a +volunteer. Bram helped to expand the centre and worked in the area of water +and sanitation. Bram learned that the help that the KCC provides really +helps. When Bram came back to Holland, he wanted to continue supporting KCC. +To do this he has been raising funds and organizing the sponsorship program. -Compared with other organizations that do child sponsorship the amounts are -very low. This is because the money goes directly to the centre. Less than -5% is used for administration. This is possible because this is a small -organization that works with volunteers. If you would like to sponsor a -child, you should have the intention to do this for at least one year. - -How do you know that the money will be spent right? First of all you have my -personal guarantee as the author of Vim. I trust the people that are working -at the centre, I know them personally. Furthermore, the centre has been +How do you know that the money will be spent right? First of all you have the +personal guarantee of Bram as the author of Vim, who knew the people working +at the centre personally. Furthermore, the centre has been co-sponsored and inspected by World Vision, Save the Children Fund and is now -under the supervision of Pacific Academy Outreach Society. The centre is -visited about once a year to check the progress (at our own cost). I have -visited the centre myself many times, starting in 1993. The visit reports are -on the ICCF web site. +under the supervision of Pacific Academy Outreach Society. Bram has +visited the centre many times, starting in 1993. The visit reports are +have been shared on the ICCF web site (may no longer be available). -If you have any further questions, send e-mail: . +If you have any further questions, send an e-mail: info@kuwasha.net. The address of the centre is: Kibaale Children's Centre p.o. box 1658 Masaka, Uganda, East Africa -Sending money: *iccf-donations* + *donate* +Sending money: -Check the ICCF web site for the latest information! See |iccf| for the URL. +Check the Kuwasha web site for the latest information! - -USA: The methods mentioned below can be used. - If you must send a check send it to our Canadian partner: - https://www.kuwasha.net/ - -Canada: Contact Kuwasha in Surrey, Canada. They take care of the - Canadian sponsors for the children in Kibaale. Kuwasha - forwards 100% of the money to the project in Uganda. You can - send them a one time donation directly. Look on their site for information about sponsorship: https://www.kuwasha.net/ If you make a donation to Kuwasha you will receive a tax receipt which can be submitted with your tax return. -Holland: Transfer to the account of "Stichting ICCF Holland" in - Amersfoort. This will allow for tax deduction if you live in - Holland. ING bank, IBAN: NL95 INGB 0004 5487 74 - -Germany: It is possible to make donations that allow for a tax return. - Check the ICCF web site for the latest information: - https://iccf-holland.org/germany.html - -Europe: Use a bank transfer if possible. See "Others" below for the - swift code and IBAN number. - Any other method should work. Ask for information about - sponsorship. - Credit Card: You can use PayPal to send money with a Credit card. This is the most widely used Internet based payment system. It's really simple to use. Use this link to find more info: https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q The e-mail address for sending the money to is: - Bram@iccf-holland.org - -Others: Transfer to this account if possible: - ING bank: IBAN: NL95 INGB 0004 5487 74 - Swift code: INGBNL2A - under the name "stichting ICCF Holland", Amersfoort - Checks are not accepted. - + info@kuwasha.net vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index 88d4913690..2f6f42b971 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -1,4 +1,4 @@ -*usr_01.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_01.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM USER MANUAL by Bram Moolenaar @@ -191,7 +191,7 @@ manual. Not only by providing literal text, but also by setting the tone and style. If you make money through selling the manuals, you are strongly encouraged to -donate part of the profit to help AIDS victims in Uganda. See |iccf|. +donate part of the profit to help AIDS victims in Uganda. See |Kuwasha|. ============================================================================== diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 23f4bed554..344a55e012 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -52,7 +52,7 @@ remember him! Vim version 9.1 is dedicated to Bram Moolenaar, who passed away on August 3rd 2023 while still working full-time on Vim. The Vim project would not exist without his ongoing passion to lead and develop Vim and the community for more -than 30 years. Bram was also passionate about his |ICCF| foundation to help +than 30 years. Bram was also passionate about his ICCF foundation to help children in Uganda. If you enjoy using Vim, please consider donating! We will miss his guidance, passion and leadership. @@ -41783,6 +41783,11 @@ Others: ~ - Vim triggers the |TermResponseAll| autocommand for any terminal OSC value. - Support CTRL-B and CTRL-F in the |more-prompt|. + +Not Vim related~ +- Updated sponsorship documentation to replace references to ICCF with Kuwasha + International Development Society as Vim's designated charity. + *added-9.2* Added ~ ----- diff --git a/src/po/vim.pot b/src/po/vim.pot index ac1fe9a090..ddac4a3638 100644 --- a/src/po/vim.pot +++ b/src/po/vim.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Vim\n" "Report-Msgid-Bugs-To: vim-dev@vim.org\n" -"POT-Creation-Date: 2025-10-31 09:13+0000\n" +"POT-Creation-Date: 2025-11-01 16:14+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3546,7 +3546,7 @@ msgstr "" msgid "Help poor children in Uganda!" msgstr "" -msgid "type :help iccf for information " +msgid "type :help Kuwasha for information " msgstr "" msgid "type :q to exit " diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim index c19d39fbf7..2841a31278 100644 --- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -114,6 +114,7 @@ func Test_window_cmd_wincmd_gf() new | only! augroup! test_window_cmd_wincmd_gf + bw! endfunc func Test_window_quit() @@ -596,14 +597,14 @@ func Test_window_jump_tag() CheckFeature quickfix help - /iccf - call assert_match('^|iccf|', getline('.')) + /Kuwasha + call assert_match('^|Kuwasha|', getline('.')) call assert_equal(2, winnr('$')) 2wincmd } call assert_equal(3, winnr('$')) - call assert_match('^|iccf|', getline('.')) + call assert_match('^|Kuwasha|', getline('.')) wincmd k - call assert_match('\*iccf\*', getline('.')) + call assert_match('\*Kuwasha\*', getline('.')) call assert_equal(2, winheight(0)) wincmd z @@ -823,6 +824,7 @@ func Test_window_prevwin() q set hidden&vim autoread&vim delfunc Fun_RenewFile + bw! endfunc func Test_relative_cursor_position_in_one_line_window() @@ -2117,6 +2119,7 @@ func Test_splitkeep_skipcol() let buf = RunVimInTerminal('-S XTestSplitkeepSkipcol', #{rows: 12, cols: 40}) call VerifyScreenDump(buf, 'Test_splitkeep_skipcol_1', {}) + call StopVimInTerminal(buf) endfunc func Test_splitkeep_line() @@ -2135,6 +2138,7 @@ func Test_splitkeep_line() call term_sendkeys(buf, ":wincmd s\") call VerifyScreenDump(buf, 'Test_splitkeep_line_2', {}) + call StopVimInTerminal(buf) endfunc func Test_new_help_window_on_error() diff --git a/src/version.c b/src/version.c index ff8121c4fd..e6dd363c53 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1893, /**/ 1892, /**/ @@ -5029,7 +5031,7 @@ intro_message( N_("Vim is open source and freely distributable"), "", N_("Help poor children in Uganda!"), - N_("type :help iccf for information "), + N_("type :help Kuwasha for information "), "", N_("type :q to exit "), N_("type :help or for on-line help"), @@ -5105,7 +5107,7 @@ intro_message( p = sponsor < 0 ? N_("Sponsor Vim development!") : N_("Become a registered Vim user!"); - else if (strstr(p, "iccf") != NULL) + else if (strstr(p, "Kuwasha") != NULL) p = sponsor < 0 ? N_("type :help sponsor for information ") : N_("type :help register for information "); From 7c418c75a404b7cc9d3380b63b6faf3a281a9440 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 1 Nov 2025 16:20:10 +0000 Subject: [PATCH 14/54] patch 9.1.1894: global_runtime_dir appends /after directory when using XDG Problem: global_runtime_dir appends /after directory when using XDG configuration directory (Marius Gedminas). Solution: Do not append /after to RUNTIME_GLOBAL_AFTER. closes: #18663 closes: #18665 Signed-off-by: Christian Brabandt --- src/os_haiku.h | 4 ++-- src/os_unix.h | 4 ++-- src/version.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/os_haiku.h b/src/os_haiku.h index c9ce8fcf4f..cd6feb2c16 100644 --- a/src/os_haiku.h +++ b/src/os_haiku.h @@ -26,8 +26,8 @@ #ifdef RUNTIME_GLOBAL # ifdef RUNTIME_GLOBAL_AFTER # define DFLT_RUNTIMEPATH USR_VIM_DIR "," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER "," USR_VIM_DIR "/after" -# define XDG_RUNTIMEPATH "$XDG_CONFIG_HOME/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER "/after,$XDG_CONFIG_HOME/vim/after" -# define XDG_RUNTIMEPATH_FB "~/config/settings/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER "/after,~/config/settings/vim/after" +# define XDG_RUNTIMEPATH "$XDG_CONFIG_HOME/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",$XDG_CONFIG_HOME/vim/after" +# define XDG_RUNTIMEPATH_FB "~/config/settings/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/config/settings/vim/after" # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER # else # define DFLT_RUNTIMEPATH USR_VIM_DIR "," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after," USR_VIM_DIR "/after" diff --git a/src/os_unix.h b/src/os_unix.h index 145a404e03..2125ae7bad 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -359,8 +359,8 @@ typedef struct dsc$descriptor DESC; # ifdef RUNTIME_GLOBAL # ifdef RUNTIME_GLOBAL_AFTER # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after" -# define XDG_RUNTIMEPATH "$XDG_CONFIG_HOME/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER "/after,$XDG_CONFIG_HOME/vim/after" -# define XDG_RUNTIMEPATH_FB "~/.config/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER "/after,~/.config/vim/after" +# define XDG_RUNTIMEPATH "$XDG_CONFIG_HOME/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",$XDG_CONFIG_HOME/vim/after" +# define XDG_RUNTIMEPATH_FB "~/.config/vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.config/vim/after" # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER # else # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after" diff --git a/src/version.c b/src/version.c index e6dd363c53..b8a4d78a84 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1894, /**/ 1893, /**/ From 8707b7a15b8a22ee4f60e1f9e7d3d417b20e60d2 Mon Sep 17 00:00:00 2001 From: Foxe Chen Date: Sat, 1 Nov 2025 16:26:18 +0000 Subject: [PATCH 15/54] patch 9.1.1895: OSC terminal response hard to detect Problem: OSC terminal response hard to detect Solution: Add the and pseudo keys (Foxe Chen) closes: #18660 Signed-off-by: Foxe Chen Signed-off-by: Christian Brabandt --- runtime/doc/intro.txt | 4 +++- runtime/doc/tags | 2 ++ src/keymap.h | 2 ++ src/misc2.c | 2 ++ src/term.c | 5 ++++- src/version.c | 2 ++ 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 46aa9428f3..828d2852d9 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*intro.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -450,6 +450,8 @@ notation meaning equivalent decimal value(s) ~ delete 127 command sequence intro ALT-Esc 155 ** CSI when typed in the GUI ** + operating system command 157 ** + finished OSC response ** end-of-line (can be , or , depends on system and 'fileformat') ** diff --git a/runtime/doc/tags b/runtime/doc/tags index 8fd8cbae16..09ba497efc 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -3841,6 +3841,7 @@ $quote eval.txt /*$quote* motion.txt /** map.txt /** intro.txt /** + intro.txt /** scroll.txt /** scroll.txt /** map.txt /** @@ -3961,6 +3962,7 @@ $quote eval.txt /*$quote* term.txt /** -xterm term.txt /*-xterm* term.txt /** + intro.txt /** term.txt /** term.txt /** = change.txt /*=* diff --git a/src/keymap.h b/src/keymap.h index e993e0999a..d300979502 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -280,6 +280,7 @@ enum key_extra , KE_SID = 106 // special key, followed by {nr}; , KE_ESC = 107 // used for K_ESC , KE_WILD = 108 // triggers wildmode completion + , KE_OSC = 109 // OSC sequence }; /* @@ -478,6 +479,7 @@ enum key_extra #define K_MOUSERIGHT TERMCAP2KEY(KS_EXTRA, KE_MOUSERIGHT) #define K_CSI TERMCAP2KEY(KS_EXTRA, KE_CSI) +#define K_OSC TERMCAP2KEY(KS_EXTRA, KE_OSC) #define K_SNR TERMCAP2KEY(KS_EXTRA, KE_SNR) #define K_PLUG TERMCAP2KEY(KS_EXTRA, KE_PLUG) #define K_CMDWIN TERMCAP2KEY(KS_EXTRA, KE_CMDWIN) diff --git a/src/misc2.c b/src/misc2.c index 8380e745c9..fcbf0dd1cd 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1053,6 +1053,7 @@ static struct key_name_entry {TRUE, NL, STRING_INIT("NewLine"), TRUE}, {TRUE, NL, STRING_INIT("NL"), FALSE}, {TRUE, K_ZERO, STRING_INIT("Nul"), FALSE}, + {TRUE, OSC, STRING_INIT("OSC"), FALSE}, {TRUE, K_PAGEDOWN, STRING_INIT("PageDown"), FALSE}, {TRUE, K_PAGEUP, STRING_INIT("PageUp"), FALSE}, {TRUE, K_PE, STRING_INIT("PasteEnd"), FALSE}, @@ -1111,6 +1112,7 @@ static struct key_name_entry {TRUE, K_XF4, STRING_INIT("xF4"), FALSE}, {TRUE, K_XHOME, STRING_INIT("xHome"), FALSE}, {TRUE, K_XLEFT, STRING_INIT("xLeft"), FALSE}, + {TRUE, K_OSC, STRING_INIT("xOSC"), FALSE}, {TRUE, K_XRIGHT, STRING_INIT("xRight"), FALSE}, {TRUE, K_XUP, STRING_INIT("xUp"), FALSE}, {TRUE, K_ZEND, STRING_INIT("zEnd"), FALSE}, diff --git a/src/term.c b/src/term.c index 4c365b19bd..39005b242a 100644 --- a/src/term.c +++ b/src/term.c @@ -5933,7 +5933,6 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen) last_char = ((char_u *)osc_state.buf.ga_data)[osc_state.buf.ga_len - 1]; key_name[0] = (int)KS_EXTRA; - key_name[1] = (int)KE_IGNORE; // Read data and append to buffer. If we reach a terminator, then // finally set the vim var. @@ -5945,6 +5944,8 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen) { osc_state.processing = FALSE; + key_name[1] = (int)KE_OSC; + ga_concat_len(&osc_state.buf, tp, i + 1 + (tp[i] == ESC)); ga_append(&osc_state.buf, NUL); *slen = i + 1 + (tp[i] == ESC); @@ -5962,6 +5963,8 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen) return OK; } + key_name[1] = (int)KE_IGNORE; + #ifdef ELAPSED_FUNC if (ELAPSED_FUNC(osc_state.start_tv) >= p_ost) { diff --git a/src/version.c b/src/version.c index b8a4d78a84..e42edad47c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1895, /**/ 1894, /**/ From 213109a999c8c854c1af3bf57540e56afa23c20c Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sat, 1 Nov 2025 17:04:43 +0000 Subject: [PATCH 16/54] runtime(doc): clarify W11 warning and possible options fixes: #18589 Signed-off-by: Christian Brabandt --- runtime/doc/message.txt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 33b8fbdfee..a8d7b577c8 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*message.txt* For Vim version 9.1. Last change: 2025 Nov 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -644,6 +644,22 @@ Set the 'autoread' option if you want to do this automatically. This message is not given when 'buftype' is not empty. Also see the |FileChangedShell| autocommand. +You will be given a dialog with the following options: + +"OK": Dismiss the warning and continue editing. No changes are + loaded, the buffer remains as it is. + +"Load File": Reload the file from disk, replacing the current buffer + contents. Any changes you made in Vim that haven't been saved + will be lost. + +"Load File and Options": + Reload the file from disk and, in addition, apply relevant + file settings, such as indentation, syntax highlighting, text + width, and other filetype-specific options. This ensures the + buffer matches the file's intended configuration according to + your current settings and autocommands. + There is one situation where you get this message even though there is nothing wrong: If you save a file in Windows on the day the daylight saving time starts. It can be fixed in one of these ways: From 1ead1b51e1d56ca3248661805c37422f865d2c95 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 2 Nov 2025 15:24:42 +0000 Subject: [PATCH 17/54] patch 9.1.1896: tests: patch v9.1.1895 breaks CI Problem: tests: patch v9.1.1895 breaks CI, by failing screen dump tests test_listlbr_utf8, test_diffmode and test_cmdline Solution: Revert it Revert "patch 9.1.1895: OSC terminal response hard to detect" This reverts commit 8707b7a15b8a22ee4f60e1f9e7d3d417b20e60d2. related: #18660 Signed-off-by: Christian Brabandt --- runtime/doc/intro.txt | 4 +--- runtime/doc/tags | 2 -- src/keymap.h | 2 -- src/misc2.c | 2 -- src/term.c | 5 +---- src/version.c | 2 ++ 6 files changed, 4 insertions(+), 13 deletions(-) diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 828d2852d9..46aa9428f3 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*intro.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -450,8 +450,6 @@ notation meaning equivalent decimal value(s) ~ delete 127 command sequence intro ALT-Esc 155 ** CSI when typed in the GUI ** - operating system command 157 ** - finished OSC response ** end-of-line (can be , or , depends on system and 'fileformat') ** diff --git a/runtime/doc/tags b/runtime/doc/tags index 09ba497efc..8fd8cbae16 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -3841,7 +3841,6 @@ $quote eval.txt /*$quote* motion.txt /** map.txt /** intro.txt /** - intro.txt /** scroll.txt /** scroll.txt /** map.txt /** @@ -3962,7 +3961,6 @@ $quote eval.txt /*$quote* term.txt /** -xterm term.txt /*-xterm* term.txt /** - intro.txt /** term.txt /** term.txt /** = change.txt /*=* diff --git a/src/keymap.h b/src/keymap.h index d300979502..e993e0999a 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -280,7 +280,6 @@ enum key_extra , KE_SID = 106 // special key, followed by {nr}; , KE_ESC = 107 // used for K_ESC , KE_WILD = 108 // triggers wildmode completion - , KE_OSC = 109 // OSC sequence }; /* @@ -479,7 +478,6 @@ enum key_extra #define K_MOUSERIGHT TERMCAP2KEY(KS_EXTRA, KE_MOUSERIGHT) #define K_CSI TERMCAP2KEY(KS_EXTRA, KE_CSI) -#define K_OSC TERMCAP2KEY(KS_EXTRA, KE_OSC) #define K_SNR TERMCAP2KEY(KS_EXTRA, KE_SNR) #define K_PLUG TERMCAP2KEY(KS_EXTRA, KE_PLUG) #define K_CMDWIN TERMCAP2KEY(KS_EXTRA, KE_CMDWIN) diff --git a/src/misc2.c b/src/misc2.c index fcbf0dd1cd..8380e745c9 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1053,7 +1053,6 @@ static struct key_name_entry {TRUE, NL, STRING_INIT("NewLine"), TRUE}, {TRUE, NL, STRING_INIT("NL"), FALSE}, {TRUE, K_ZERO, STRING_INIT("Nul"), FALSE}, - {TRUE, OSC, STRING_INIT("OSC"), FALSE}, {TRUE, K_PAGEDOWN, STRING_INIT("PageDown"), FALSE}, {TRUE, K_PAGEUP, STRING_INIT("PageUp"), FALSE}, {TRUE, K_PE, STRING_INIT("PasteEnd"), FALSE}, @@ -1112,7 +1111,6 @@ static struct key_name_entry {TRUE, K_XF4, STRING_INIT("xF4"), FALSE}, {TRUE, K_XHOME, STRING_INIT("xHome"), FALSE}, {TRUE, K_XLEFT, STRING_INIT("xLeft"), FALSE}, - {TRUE, K_OSC, STRING_INIT("xOSC"), FALSE}, {TRUE, K_XRIGHT, STRING_INIT("xRight"), FALSE}, {TRUE, K_XUP, STRING_INIT("xUp"), FALSE}, {TRUE, K_ZEND, STRING_INIT("zEnd"), FALSE}, diff --git a/src/term.c b/src/term.c index 39005b242a..4c365b19bd 100644 --- a/src/term.c +++ b/src/term.c @@ -5933,6 +5933,7 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen) last_char = ((char_u *)osc_state.buf.ga_data)[osc_state.buf.ga_len - 1]; key_name[0] = (int)KS_EXTRA; + key_name[1] = (int)KE_IGNORE; // Read data and append to buffer. If we reach a terminator, then // finally set the vim var. @@ -5944,8 +5945,6 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen) { osc_state.processing = FALSE; - key_name[1] = (int)KE_OSC; - ga_concat_len(&osc_state.buf, tp, i + 1 + (tp[i] == ESC)); ga_append(&osc_state.buf, NUL); *slen = i + 1 + (tp[i] == ESC); @@ -5963,8 +5962,6 @@ handle_osc(char_u *tp, int len, char_u *key_name, int *slen) return OK; } - key_name[1] = (int)KE_IGNORE; - #ifdef ELAPSED_FUNC if (ELAPSED_FUNC(osc_state.start_tv) >= p_ost) { diff --git a/src/version.c b/src/version.c index e42edad47c..ba48dda5a9 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1896, /**/ 1895, /**/ From 461dd9aca68e45a437a559296e21066b6ca87be3 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 4 Nov 2025 18:13:55 +0000 Subject: [PATCH 18/54] runtime(vim): 'iskeyword' setting not correctly restored fixes: #18673 Signed-off-by: Christian Brabandt --- runtime/syntax/generator/vim.vim.base | 6 +++--- runtime/syntax/vim.vim | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 40139de24b..0f7d3ff89d 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Oct 27 +" Last Change: 2025 Nov 04 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -1923,10 +1923,10 @@ VimFoldl syn region vimLuaHeredoc contained " [-- mzscheme --] {{{3 if s:interfaces =~# 'm' - let s:iskKeep = &isk + let s:iskKeep = &l:isk syn include @vimMzSchemeScript syntax/scheme.vim unlet b:current_syntax - let &isk = s:iskKeep + let &l:isk = s:iskKeep endif syn keyword vimMzScheme mz[scheme] skipwhite nextgroup=vimMzSchemeHeredoc,vimMzSchemeStatement diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 4f0a148618..69ca7d1530 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 01 +" Last Change: 2025 Nov 04 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -1985,10 +1985,10 @@ VimFoldl syn region vimLuaHeredoc contained " [-- mzscheme --] {{{3 if s:interfaces =~# 'm' - let s:iskKeep = &isk + let s:iskKeep = &l:isk syn include @vimMzSchemeScript syntax/scheme.vim unlet b:current_syntax - let &isk = s:iskKeep + let &l:isk = s:iskKeep endif syn keyword vimMzScheme mz[scheme] skipwhite nextgroup=vimMzSchemeHeredoc,vimMzSchemeStatement From 7dfdc7f6cb802d5283e2e0eedb87932b9cd2cb33 Mon Sep 17 00:00:00 2001 From: tocariimaa Date: Wed, 5 Nov 2025 20:49:26 +0000 Subject: [PATCH 19/54] runtime(sml): add filetype plugin, move options from indent to ftplugin closes: #18680 Signed-off-by: tocariimaa Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 1 + runtime/ftplugin/sml.vim | 39 +++++++++++++++++++++++++++++++++++++++ runtime/indent/sml.vim | 17 ++++++----------- 3 files changed, 46 insertions(+), 11 deletions(-) create mode 100644 runtime/ftplugin/sml.vim diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index d904e1c95a..b7e22e2020 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -286,6 +286,7 @@ runtime/ftplugin/sed.vim @dkearns runtime/ftplugin/sh.vim @dkearns runtime/ftplugin/shaderslang.vim @mTvare6 runtime/ftplugin/slint.vim @ribru17 +runtime/ftplugin/sml.vim @tocariimaa runtime/ftplugin/snakemake.vim @ribru17 runtime/ftplugin/solidity.vim @coti-z runtime/ftplugin/solution.vim @dkearns diff --git a/runtime/ftplugin/sml.vim b/runtime/ftplugin/sml.vim new file mode 100644 index 0000000000..f4a2f4ecd0 --- /dev/null +++ b/runtime/ftplugin/sml.vim @@ -0,0 +1,39 @@ +" Vim filetype plugin file +" Language: SML +" Filenames: *.sml *.sig +" Maintainer: tocariimaa +" Last Change: 2025 Nov 04 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = 'setl com< cms< fo<' + +setlocal formatoptions+=croql formatoptions-=t +setlocal commentstring=(*\ %s\ *) +setlocal comments=sr:(*,mb:*,ex:*) + +if exists('loaded_matchit') + let b:match_ignorecase = 0 + let b:match_words = '\<\%(abstype\|let\|local\|sig\|struct\)\>:\<\%(in\|with\)\>:\' + let b:undo_ftplugin ..= ' | unlet! b:match_ignorecase b:match_words' +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "SML Source Files (*.sml)\t*.sml\n" .. + \ "SML Signature Files (*.sig)\t*.sig\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/sml.vim b/runtime/indent/sml.vim index a0b0c3e911..189452f477 100644 --- a/runtime/indent/sml.vim +++ b/runtime/indent/sml.vim @@ -1,17 +1,18 @@ " Vim indent file " Language: SML -" Maintainer: Saikat Guha -" Hubert Chao +" Maintainer: Saikat Guha +" Hubert Chao " Original OCaml Version: -" Jean-Francois Yuen +" Jean-Francois Yuen " Mike Leary " Markus Mottl " OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim " Last Change: 2022 Apr 06 -" 2002 Nov 06 - Some fixes (JY) +" 2002 Nov 06 - Some fixes (JY) " 2002 Oct 28 - Fixed bug with indentation of ']' (MM) " 2002 Oct 22 - Major rewrite (JY) -" 2022 April: b:undo_indent added by Doug Kearns +" 2022 Apr 08 - b:undo_indent added by Doug Kearns +" 2025 Nov 04 - Move comments and formatoptions to ftplugin " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -29,12 +30,6 @@ setlocal shiftwidth=2 let b:undo_indent = "setl et< inde< indk< lisp< si< sw< tw<" -" Comment formatting -if (has("comments")) - set comments=sr:(*,mb:*,ex:*) - set fo=cqort -endif - " Only define the function once. "if exists("*GetSMLIndent") "finish From 84baba329a1c4984415cfe8359e962c38efac860 Mon Sep 17 00:00:00 2001 From: Konfekt Date: Thu, 6 Nov 2025 19:47:36 +0000 Subject: [PATCH 20/54] runtime(compiler): do not override &l:makeprg on :compiler! closes: #18686 Signed-off-by: Konfekt Signed-off-by: Christian Brabandt --- runtime/compiler/cppcheck.vim | 8 ++++---- runtime/compiler/mypy.vim | 8 ++++---- runtime/compiler/pylint.vim | 7 ++++--- runtime/compiler/ruff.vim | 7 ++++--- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/runtime/compiler/cppcheck.vim b/runtime/compiler/cppcheck.vim index 033613c091..17f79f4fa0 100644 --- a/runtime/compiler/cppcheck.vim +++ b/runtime/compiler/cppcheck.vim @@ -1,7 +1,7 @@ " vim compiler file " Compiler: cppcheck (C++ static checker) " Maintainer: Vincent B. (twinside@free.fr) -" Last Change: 2024 Nov 19 by @Konfekt +" Last Change: 2025 Nov 06 by @Konfekt if exists("current_compiler") | finish | endif let current_compiler = "cppcheck" @@ -18,14 +18,14 @@ if !exists('g:c_cppcheck_params') let s:undo_compiler = 'unlet! g:c_cppcheck_params' endif -let &l:makeprg = 'cppcheck --quiet' +exe 'CompilerSet makeprg=' .. escape('cppcheck --quiet' \ ..' --template="{file}:{line}:{column}: {severity}: [{id}] {message} {callstack}"' \ ..' '..get(b:, 'c_cppcheck_params', get(g:, 'c_cppcheck_params', (&filetype ==# 'cpp' ? ' --language=c++' : ''))) \ ..' '..get(b:, 'c_cppcheck_includes', get(g:, 'c_cppcheck_includes', \ (filereadable('compile_commands.json') ? '--project=compile_commands.json' : \ (!empty(glob('*'..s:slash..'compile_commands.json', 1, 1)) ? '--project='..glob('*'..s:slash..'compile_commands.json', 1, 1)[0] : - \ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I'))))) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') + \ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I'))))), + \ ' \|"') CompilerSet errorformat= \%f:%l:%c:\ %tarning:\ %m, diff --git a/runtime/compiler/mypy.vim b/runtime/compiler/mypy.vim index 907b98b777..c7a575ce2d 100644 --- a/runtime/compiler/mypy.vim +++ b/runtime/compiler/mypy.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Mypy (Python static checker) " Maintainer: @Konfekt -" Last Change: 2024 Nov 19 +" Last Change: 2025 Nov 06 if exists("current_compiler") | finish | endif let current_compiler = "mypy" @@ -10,9 +10,9 @@ let s:cpo_save = &cpo set cpo&vim " CompilerSet makeprg=mypy -let &l:makeprg = 'mypy --show-column-numbers ' - \ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports')) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') +exe 'CompilerSet makeprg=' .. escape('mypy --show-column-numbers ' + \ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports')), + \ ' \|"') CompilerSet errorformat=%f:%l:%c:\ %t%*[^:]:\ %m let &cpo = s:cpo_save diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim index 96abf315ab..749fe7d134 100644 --- a/runtime/compiler/pylint.vim +++ b/runtime/compiler/pylint.vim @@ -3,6 +3,7 @@ " Maintainer: Daniel Moch " Last Change: 2024 Nov 07 by The Vim Project (added params variable) " 2024 Nov 19 by the Vim Project (properly escape makeprg setting) +" 2025 Nov 06 by the Vim Project (do not set buffer-local makeprg) if exists("current_compiler") | finish | endif let current_compiler = "pylint" @@ -11,10 +12,10 @@ let s:cpo_save = &cpo set cpo&vim " CompilerSet makeprg=ruff -let &l:makeprg = 'pylint ' . +exe 'CompilerSet makeprg=' .. escape('pylint ' . \ '--output-format=text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" --reports=no ' . - \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", '--jobs=0')) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') + \ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", '--jobs=0')), + \ ' \|"') CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# let &cpo = s:cpo_save diff --git a/runtime/compiler/ruff.vim b/runtime/compiler/ruff.vim index 318f4fe5cb..d10e6eda28 100644 --- a/runtime/compiler/ruff.vim +++ b/runtime/compiler/ruff.vim @@ -3,6 +3,7 @@ " Maintainer: @pbnj-dragon " Last Change: 2024 Nov 07 " 2024 Nov 19 by the Vim Project (properly escape makeprg setting) +" 2025 Nov 06 by the Vim Project (do not set buffer-local makeprg) if exists("current_compiler") | finish | endif let current_compiler = "ruff" @@ -11,9 +12,9 @@ let s:cpo_save = &cpo set cpo&vim " CompilerSet makeprg=ruff -let &l:makeprg= 'ruff check --output-format=concise ' - \ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')) -exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"') +exe 'CompilerSet makeprg=' .. escape('ruff check --output-format=concise ' + \ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview')), + \ ' \|"') CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f: let &cpo = s:cpo_save From 24e4fa1603ff30d814c08a3516b092f012067732 Mon Sep 17 00:00:00 2001 From: Luke Lollard Date: Thu, 6 Nov 2025 20:04:38 +0000 Subject: [PATCH 21/54] patch 9.1.1897: Mac: Build failure on Mac OS X 10.6 Problem: Mac: Build failure on Mac OS X 10.6 due to the use of generics for the sound feature. Solution: Use the simple, non-generic Objective-C version. (Luke Lollard) fixes: #17678 closes: #18681 Co-authored-by: Yee Cheng Chin Signed-off-by: Luke Lollard Signed-off-by: Christian Brabandt --- src/os_macosx.m | 8 ++++---- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/os_macosx.m b/src/os_macosx.m index 153c2f190c..1a633b9d6c 100644 --- a/src/os_macosx.m +++ b/src/os_macosx.m @@ -386,7 +386,7 @@ timer_delete(timer_t timerid) #ifdef FEAT_SOUND -static NSMutableDictionary *sounds_list = nil; +static NSMutableDictionary *sounds_list = nil; /// A delegate for handling when a sound has stopped playing, in /// order to clean up the sound and to send a callback. @@ -463,9 +463,9 @@ sound_mch_play(const char_u* sound_name, long sound_id, soundcb_T *callback, boo if (sounds_list == nil) { - sounds_list = [[NSMutableDictionary alloc] init]; + sounds_list = [[NSMutableDictionary alloc] init]; } - sounds_list[[NSNumber numberWithLong:sound_id]] = sound; + [sounds_list setObject:sound forKey:[NSNumber numberWithLong:sound_id]]; // Make a delegate to handle when the sound stops. No need to call // autorelease because NSSound only holds a weak reference to it. @@ -482,7 +482,7 @@ sound_mch_stop(long sound_id) { @autoreleasepool { - NSSound *sound = sounds_list[[NSNumber numberWithLong:sound_id]]; + NSSound *sound = [sounds_list objectForKey:[NSNumber numberWithLong:sound_id]]; if (sound != nil) { // Stop the sound. No need to release it because the delegate will do diff --git a/src/version.c b/src/version.c index ba48dda5a9..f69be10d20 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1897, /**/ 1896, /**/ From cf4d9625c6eb21107e030dc879c1390596fbdb8d Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Thu, 6 Nov 2025 20:23:36 +0000 Subject: [PATCH 22/54] patch 9.1.1898: tabpanel: inconsistent use of cmdline with tabpanel Problem: tabpanel: inconsistent use of cmdline and message area with tabpanel Solution: Reduce the cmdline and message area by the horizontal size of the tabpanel (Hirohito Higashi) closes: #18678 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- src/arglist.c | 2 +- src/cmdexpand.c | 28 ++--- src/digraph.c | 2 +- src/drawscreen.c | 10 +- src/ex_cmds.c | 8 +- src/ex_docmd.c | 2 +- src/ex_getln.c | 48 ++++---- src/getchar.c | 2 +- src/globals.h | 2 + src/highlight.c | 8 +- src/if_cscope.c | 2 +- src/main.c | 3 + src/message.c | 103 ++++++++++-------- src/misc1.c | 4 +- src/mouse.c | 5 +- src/normal.c | 5 +- src/os_unix.c | 6 +- src/os_win32.c | 6 +- src/screen.c | 24 ++-- src/search.c | 5 +- src/spellsuggest.c | 2 +- src/syntax.c | 4 +- src/tabpanel.c | 6 +- src/tag.c | 6 +- .../dumps/Test_tabpanel_commandline_0.dump | 4 +- .../dumps/Test_tabpanel_commandline_1.dump | 10 +- ...abpanel_dont_overflow_into_tabpanel_0.dump | 2 +- .../dumps/Test_tabpanel_drawing_01.dump | 2 +- .../dumps/Test_tabpanel_drawing_02.dump | 2 +- .../dumps/Test_tabpanel_drawing_03.dump | 2 +- .../dumps/Test_tabpanel_drawing_04.dump | 2 +- .../dumps/Test_tabpanel_drawing_05.dump | 2 +- .../dumps/Test_tabpanel_drawing_06.dump | 2 +- .../dumps/Test_tabpanel_drawing_07.dump | 2 +- .../dumps/Test_tabpanel_drawing_08.dump | 2 +- .../dumps/Test_tabpanel_drawing_2_0.dump | 2 +- .../dumps/Test_tabpanel_drawing_2_1.dump | 2 +- .../Test_tabpanel_drawing_fill_tailing_0.dump | 2 +- .../dumps/Test_tabpanel_drawing_pum_0.dump | 2 +- .../dumps/Test_tabpanel_drawing_pum_1.dump | 2 +- .../dumps/Test_tabpanel_drawing_pum_2.dump | 2 +- .../Test_tabpanel_drawing_scrolling_0.dump | 2 +- .../Test_tabpanel_drawing_scrolling_1.dump | 2 +- .../Test_tabpanel_drawing_scrolling_2.dump | 2 +- .../Test_tabpanel_drawing_scrolling_3.dump | 2 +- ...Test_tabpanel_drawing_with_popupwin_1.dump | 2 +- ...Test_tabpanel_drawing_with_popupwin_2.dump | 2 +- .../dumps/Test_tabpanel_equalalways_0.dump | 2 +- .../dumps/Test_tabpanel_equalalways_1.dump | 2 +- .../dumps/Test_tabpanel_equalalways_2.dump | 2 +- .../dumps/Test_tabpanel_equalalways_3.dump | 2 +- ...el_eval_tabpanel_statusline_tabline_0.dump | 2 +- ...el_eval_tabpanel_statusline_tabline_1.dump | 2 +- ...panel_eval_tabpanel_with_linebreaks_0.dump | 2 +- ...panel_eval_tabpanel_with_linebreaks_1.dump | 2 +- .../dumps/Test_tabpanel_many_tabpages_0.dump | 2 +- .../dumps/Test_tabpanel_many_tabpages_1.dump | 2 +- .../dumps/Test_tabpanel_many_tabpages_2.dump | 2 +- .../dumps/Test_tabpanel_many_tabpages_3.dump | 2 +- .../dumps/Test_tabpanel_many_tabpages_4.dump | 6 +- ..._noeval_tabpanel_statusline_tabline_0.dump | 2 +- ..._noeval_tabpanel_statusline_tabline_1.dump | 2 +- src/testdir/dumps/Test_tabpanel_only_0.dump | 2 +- src/testdir/dumps/Test_tabpanel_only_1.dump | 2 +- .../dumps/Test_tabpanel_quitall_0.dump | 2 +- src/testdir/dumps/Test_tabpanel_ruler_0.dump | 2 +- .../dumps/Test_tabpanel_stpl_eq_0_2.dump | 2 +- .../dumps/Test_tabpanel_stpl_eq_1_1.dump | 2 +- .../dumps/Test_tabpanel_stpl_eq_1_2.dump | 2 +- .../dumps/Test_tabpanel_stpl_eq_1_3.dump | 2 +- .../dumps/Test_tabpanel_stpl_eq_1_4.dump | 2 +- .../Test_tabpanel_tabline_and_tabpanel_0.dump | 4 +- ...st_tabpanel_vert_is_multibytes_left_0.dump | 2 +- ...st_tabpanel_vert_is_multibytes_left_1.dump | 2 +- ...st_tabpanel_vert_is_multibytes_left_2.dump | 2 +- src/testdir/dumps/Test_tabpanel_visual_0.dump | 4 +- src/testdir/dumps/Test_tabpanel_visual_1.dump | 4 +- src/testdir/dumps/Test_tabpanel_visual_2.dump | 4 +- .../Test_tabpanel_with_cmdline_no_pum_0.dump | 2 +- .../Test_tabpanel_with_cmdline_no_pum_1.dump | 4 +- .../Test_tabpanel_with_cmdline_pum_0.dump | 2 +- .../Test_tabpanel_with_cmdline_pum_1.dump | 10 +- .../Test_tabpanel_with_msg_scrolled_0.dump | 2 +- .../Test_tabpanel_with_msg_scrolled_1.dump | 2 +- .../dumps/Test_tabpanel_with_vsplit_0.dump | 2 +- .../dumps/Test_tabpanel_with_vsplit_1.dump | 2 +- .../dumps/Test_tabpanel_with_vsplit_2.dump | 2 +- .../dumps/Test_tabpanel_with_vsplit_3.dump | 2 +- .../dumps/Test_tabpanel_with_vsplit_4.dump | 2 +- .../dumps/Test_tabpanel_with_vsplit_5.dump | 2 +- src/testdir/test_tabpanel.vim | 9 +- src/version.c | 8 +- src/window.c | 27 ++++- 93 files changed, 270 insertions(+), 231 deletions(-) diff --git a/src/arglist.c b/src/arglist.c index 398e23a273..657e2790ae 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -1007,7 +1007,7 @@ arg_all_close_unused_windows(arg_all_state_T *aall) buf = wp->w_buffer; if (buf->b_ffname == NULL || (!aall->keep_tabs && (buf->b_nwindows > 1 - || wp->w_width != Columns))) + || wp->w_width != cmdline_width))) i = aall->opened_len; else { diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 104fe08ae8..5cdc55b311 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -421,7 +421,7 @@ cmdline_pum_create( if (showtail) prefix_len += vim_strsize(showmatches_gettail(matches[0])) - vim_strsize(matches[0]); - compl_startcol = MAX(0, compl_startcol - prefix_len); + compl_startcol = cmdline_col_off + MAX(0, compl_startcol - prefix_len); return EXPAND_OK; } @@ -611,9 +611,9 @@ win_redr_status_matches( return; if (has_mbyte) - buf = alloc(Columns * MB_MAXBYTES + 1); + buf = alloc(topframe->fr_width * MB_MAXBYTES + 1); else - buf = alloc(Columns + 1); + buf = alloc(topframe->fr_width + 1); if (buf == NULL) return; @@ -640,7 +640,7 @@ win_redr_status_matches( if (first_match > 0) clen += 2; // jumping right, put match at the left - if ((long)clen > Columns) + if (clen > topframe->fr_width) { first_match = match; // if showing the last match, we can add some on the left @@ -648,7 +648,7 @@ win_redr_status_matches( for (i = match; i < num_matches; ++i) { clen += status_match_len(xp, SHOW_MATCH(i)) + 2; - if ((long)clen >= Columns) + if (clen >= topframe->fr_width) break; } if (i == num_matches) @@ -659,7 +659,7 @@ win_redr_status_matches( while (first_match > 0) { clen += status_match_len(xp, SHOW_MATCH(first_match - 1)) + 2; - if ((long)clen >= Columns) + if (clen >= topframe->fr_width) break; --first_match; } @@ -679,7 +679,7 @@ win_redr_status_matches( clen = len; i = first_match; - while ((long)(clen + status_match_len(xp, SHOW_MATCH(i)) + 2) < Columns) + while (clen + status_match_len(xp, SHOW_MATCH(i)) + 2 < topframe->fr_width) { if (i == match) { @@ -773,14 +773,17 @@ win_redr_status_matches( } } - screen_puts(buf, row, 0, attr); + screen_puts(buf, row, firstwin->w_wincol, attr); if (selstart != NULL && highlight) { *selend = NUL; - screen_puts(selstart, row, selstart_col, HL_ATTR(HLF_WM)); + screen_puts(selstart, row, firstwin->w_wincol + selstart_col, + HL_ATTR(HLF_WM)); } - screen_fill(row, row + 1, clen, (int)Columns, fillchar, fillchar, attr); + screen_fill(row, row + 1, firstwin->w_wincol + clen, + firstwin->w_wincol + topframe->fr_width, + fillchar, fillchar, attr); } win_redraw_last_status(topframe); @@ -1371,7 +1374,7 @@ showmatches(expand_T *xp, int display_wildmenu, int display_list, int noselect) { // compute the number of columns and lines for the listing maxlen += 2; // two spaces between file names - columns = ((int)Columns + 2) / maxlen; + columns = (cmdline_width + 2) / maxlen; if (columns < 1) columns = 1; lines = (numMatches + columns - 1) / columns; @@ -4503,9 +4506,6 @@ wildmenu_cleanup(cmdline_info_T *cclp UNUSED) p_ls = save_p_ls; p_wmh = save_p_wmh; last_status(FALSE); -#if defined(FEAT_TABPANEL) - redraw_tabpanel = TRUE; -#endif update_screen(UPD_VALID); // redraw the screen NOW redrawcmd(); save_p_ls = -1; diff --git a/src/digraph.c b/src/digraph.c index 262353c01d..481cc4a3cf 100644 --- a/src/digraph.c +++ b/src/digraph.c @@ -1972,7 +1972,7 @@ printdigraph(digr_T *dp, result_T *previous) *previous = dp->result; } #endif - if (msg_col > Columns - list_width) + if (msg_col > cmdline_width - list_width) msg_putchar('\n'); if (msg_col) while (msg_col % list_width != 0) diff --git a/src/drawscreen.c b/src/drawscreen.c index 7d3b3bd6ad..46832302c2 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -502,7 +502,7 @@ win_redr_status(win_T *wp, int ignore_pum UNUSED) if (wp->w_buffer->b_p_ro) plen += vim_snprintf((char *)p + plen, MAXPATHL - plen, "%s", _("[RO]")); - this_ru_col = ru_col - (Columns - wp->w_width); + this_ru_col = ru_col - (cmdline_width - wp->w_width); n = (wp->w_width + 1) / 2; if (this_ru_col < n) this_ru_col = n; @@ -721,8 +721,8 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum) row = Rows - 1; fillchar = ' '; attr = 0; - width = Columns; - off = 0; + off = cmdline_col_off; + width = cmdline_width; } // In list mode virtcol needs to be recomputed @@ -755,7 +755,7 @@ win_redr_ruler(win_T *wp, int always, int ignore_pum) if (wp->w_status_height == 0) // can't use last char of screen ++n1; - this_ru_col = ru_col - (Columns - width); + this_ru_col = ru_col - (cmdline_width - width); // Never use more than half the window/screen width, leave the other // half for the filename. n2 = (width + 1) / 2; @@ -2609,7 +2609,7 @@ win_update(win_T *wp) FALSE); else screen_char(LineOffset[k] + topframe->fr_width - 1, k, - Columns - 1); + cmdline_width - 1); } #endif diff --git a/src/ex_cmds.c b/src/ex_cmds.c index bb58e47f02..8e861d5a2f 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -1253,7 +1253,7 @@ do_bang( msg_putchar('!'); msg_outtrans(newcmd); msg_clr_eos(); - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); do_shell(newcmd, 0); } @@ -1404,7 +1404,7 @@ do_filter( if (cmd_buf == NULL) goto filterend; - windgoto((int)Rows - 1, 0); + windgoto((int)Rows - 1, cmdline_col_off); cursor_on(); /* @@ -1659,7 +1659,7 @@ do_shell( // This windgoto is required for when the '\n' resulted in a "delete line // 1" command to the terminal. if (!swapping_screen()) - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); cursor_on(); (void)call_shell(cmd, SHELL_COOKED | flags); did_check_timestamps = FALSE; @@ -4694,7 +4694,7 @@ ex_substitute(exarg_T *eap) msg_no_more = FALSE; msg_scroll = i; showruler(TRUE); - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); RedrawingDisabled = save_RedrawingDisabled; #ifdef USE_ON_FLY_SCROLL diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 91a03b9d88..3f31460a0b 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -6684,7 +6684,7 @@ ex_stop(exarg_T *eap) if (!eap->forceit) autowrite_all(); apply_autocmds(EVENT_VIMSUSPEND, NULL, NULL, FALSE, NULL); - windgoto((int)Rows - 1, 0); + windgoto((int)Rows - 1, cmdline_col_off); out_char('\n'); out_flush(); stoptermcap(); diff --git a/src/ex_getln.c b/src/ex_getln.c index 5fc9330bc9..63e9814546 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -1167,7 +1167,7 @@ cmdline_erase_chars( { #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) - msg_col = Columns; + msg_col = cmdline_width; else #endif msg_col = 0; @@ -1375,8 +1375,8 @@ cmdline_left_right_mouse(int c, int *ignore_drag_release) int i; i = cmdline_charsize(ccline.cmdpos); - if (mouse_row <= cmdline_row + ccline.cmdspos / Columns - && mouse_col < ccline.cmdspos % Columns + i) + if (mouse_row <= cmdline_row + ccline.cmdspos / cmdline_width + && mouse_col < ccline.cmdspos % cmdline_width + i) break; if (has_mbyte) { @@ -2114,7 +2114,7 @@ getcmdline_int( goto cmdline_changed; if (!cmd_silent) { - windgoto(msg_row, 0); + windgoto(msg_row, cmdline_col_off); out_flush(); } break; @@ -2285,7 +2285,7 @@ getcmdline_int( if (ccline.cmdpos >= ccline.cmdlen) break; i = cmdline_charsize(ccline.cmdpos); - if (KeyTyped && ccline.cmdspos + i >= Columns * Rows) + if (KeyTyped && ccline.cmdspos + i >= cmdline_width * Rows) break; ccline.cmdspos += i; if (has_mbyte) @@ -3010,8 +3010,8 @@ set_cmdspos_cursor(void) set_cmdspos(); if (KeyTyped) { - m = Columns * Rows; - if (m < 0) // overflow, Columns or Rows at weird value + m = cmdline_width * Rows; + if (m < 0) // overflow, cmdline_width or Rows at weird value m = MAXCOL; } else @@ -3043,7 +3043,7 @@ correct_cmdspos(int idx, int cells) { if ((*mb_ptr2len)(ccline.cmdbuff + idx) > 1 && (*mb_ptr2cells)(ccline.cmdbuff + idx) > 1 - && ccline.cmdspos % Columns + cells > Columns) + && ccline.cmdspos % cmdline_width + cells > cmdline_width) ccline.cmdspos++; } @@ -3243,7 +3243,7 @@ redraw: } } msg_clr_eos(); - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); continue; } @@ -3316,7 +3316,7 @@ redraw: line_ga.ga_len += len; escaped = FALSE; - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); pend = (char_u *)(line_ga.ga_data) + line_ga.ga_len; // We are done when a NL is entered, but not when it comes after a @@ -3432,8 +3432,8 @@ redrawcmd_preedit(void) cmdpos += preedit_start_col; } - msg_row = cmdline_row + (cmdspos / (int)Columns); - msg_col = cmdspos % (int)Columns; + msg_row = cmdline_row + (cmdspos / cmdline_width); + msg_col = cmdspos % cmdline_width; if (msg_row >= Rows) msg_row = Rows - 1; @@ -3808,7 +3808,7 @@ put_on_cmdline(char_u *str, int len, int redraw) msg_col -= i; if (msg_col < 0) { - msg_col += Columns; + msg_col += cmdline_width; --msg_row; } } @@ -3827,8 +3827,8 @@ put_on_cmdline(char_u *str, int len, int redraw) } if (KeyTyped) { - m = Columns * Rows; - if (m < 0) // overflow, Columns or Rows at weird value + m = cmdline_width * Rows; + if (m < 0) // overflow, cmdline_width or Rows at weird value m = MAXCOL; } else @@ -4052,7 +4052,7 @@ redrawcmdprompt(void) if (ccline.cmdprompt != NULL) { msg_puts_attr((char *)ccline.cmdprompt, ccline.cmdattr); - ccline.cmdindent = msg_col + (msg_row - cmdline_row) * Columns; + ccline.cmdindent = msg_col + (msg_row - cmdline_row) * cmdline_width; // do the reverse of set_cmdspos() if (ccline.cmdfirstc != NUL) --ccline.cmdindent; @@ -4076,7 +4076,7 @@ redrawcmd(void) // when 'incsearch' is set there may be no command line while redrawing if (ccline.cmdbuff == NULL) { - windgoto(cmdline_row, 0); + windgoto(cmdline_row, cmdline_col_off); msg_clr_eos(); return; } @@ -4131,21 +4131,21 @@ cursorcmd(void) #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) { - msg_row = cmdline_row + (ccline.cmdspos / (int)(Columns - 1)); - msg_col = (int)Columns - (ccline.cmdspos % (int)(Columns - 1)) - 1; + msg_row = cmdline_row + (ccline.cmdspos / (cmdline_width - 1)); + msg_col = cmdline_width - (ccline.cmdspos % (cmdline_width - 1)) - 1; if (msg_row <= 0) msg_row = Rows - 1; } else #endif { - msg_row = cmdline_row + (ccline.cmdspos / (int)Columns); - msg_col = ccline.cmdspos % (int)Columns; + msg_row = cmdline_row + (ccline.cmdspos / cmdline_width); + msg_col = ccline.cmdspos % cmdline_width; if (msg_row >= Rows) msg_row = Rows - 1; } - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) if (p_imst == IM_ON_THE_SPOT) redrawcmd_preedit(); @@ -4161,13 +4161,13 @@ gotocmdline(int clr) msg_start(); #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) - msg_col = Columns - 1; + msg_col = cmdline_width - 1; else #endif msg_col = 0; // always start in column 0 if (clr) // clear the bottom line(s) msg_clr_eos(); // will reset clear_cmdline - windgoto(cmdline_row, 0); + windgoto(cmdline_row, cmdline_col_off); } /* diff --git a/src/getchar.c b/src/getchar.c index d4f4cf4267..3219fd2cef 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2448,7 +2448,7 @@ getchar_common(typval_T *argvars, typval_T *rettv, int allow_number) if (cursor_flag == 'h') cursor_sleep(); else if (cursor_flag == 'm') - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); ++no_mapping; ++allow_keys; diff --git a/src/globals.h b/src/globals.h index 6eba836d44..bd2b5f91aa 100644 --- a/src/globals.h +++ b/src/globals.h @@ -146,6 +146,8 @@ EXTERN int vgetc_char INIT(= 0); * update_screen(). */ EXTERN int cmdline_row; +EXTERN int cmdline_col_off; +EXTERN int cmdline_width; EXTERN int redraw_cmdline INIT(= FALSE); // cmdline must be redrawn EXTERN int redraw_mode INIT(= FALSE); // mode must be redrawn diff --git a/src/highlight.c b/src/highlight.c index c70c429e18..f8d3688366 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -3447,7 +3447,7 @@ syn_list_header( name_col = msg_col; endcol = 15; } - else if (msg_col + outlen + 1 >= Columns) + else if (msg_col + outlen + 1 >= cmdline_width) { msg_putchar('\n'); if (got_int) @@ -3461,15 +3461,15 @@ syn_list_header( if (msg_col >= endcol) // output at least one space endcol = msg_col + 1; - if (Columns <= (long)endcol) // avoid hang for tiny window - endcol = (int)(Columns - 1); + if (cmdline_width <= endcol) // avoid hang for tiny window + endcol = cmdline_width - 1; msg_advance(endcol); // Show "xxx" with the attributes. if (!did_header) { - if (endcol == Columns - 1 && endcol <= name_col) + if (endcol == cmdline_width - 1 && endcol <= name_col) msg_putchar(' '); msg_puts_attr("xxx", syn_id2attr(id)); msg_putchar(' '); diff --git a/src/if_cscope.c b/src/if_cscope.c index de27d7ef6b..7d246b58b5 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -2084,7 +2084,7 @@ cs_print_tags_priv(char **matches, char **cntxts, int num_matches) (void)sprintf(buf, cntxformat, context); // print the context only if it fits on the same line - if (msg_col + (int)strlen(buf) >= (int)Columns) + if (msg_col + (int)strlen(buf) >= cmdline_width) msg_putchar('\n'); msg_advance(12); msg_outtrans_long_attr((char_u *)buf, 0); diff --git a/src/main.c b/src/main.c index ba5b5b7d83..14ae3eaf37 100644 --- a/src/main.c +++ b/src/main.c @@ -398,7 +398,10 @@ main #endif cmdline_row = Rows - p_ch; + cmdline_col_off = 0; + cmdline_width = (int)Columns; msg_row = cmdline_row; + msg_col = 0; screenalloc(FALSE); // allocate screen buffers set_init_2(); TIME_MSG("inits 2"); diff --git a/src/message.c b/src/message.c index d4ebc8e68f..a6dd888b91 100644 --- a/src/message.c +++ b/src/message.c @@ -194,7 +194,7 @@ msg_attr_keep( retval = msg_end(); if (keep && retval && vim_strsize((char_u *)s) - < (int)(Rows - cmdline_row - 1) * Columns + sc_col) + < (int)(Rows - cmdline_row - 1) * cmdline_width + sc_col) set_keep_msg((char_u *)s, 0); need_fileinfo = FALSE; @@ -228,10 +228,10 @@ msg_strtrunc( #endif ) // Use all the columns. - room = (int)(Rows - msg_row) * Columns - 1; + room = (int)(Rows - msg_row) * cmdline_width - 1; else // Use up to 'showcmd' column. - room = (int)(Rows - msg_row - 1) * Columns + sc_col - 1; + room = (int)(Rows - msg_row - 1) * cmdline_width + sc_col - 1; if (len > room && room > 0) { if (enc_utf8) @@ -989,7 +989,7 @@ msg_may_trunc(int force, char_u *s) // If 'cmdheight' is zero or something unexpected happened "room" may be // negative. - room = (int)(Rows - cmdline_row - 1) * Columns + sc_col - 1; + room = (int)(Rows - cmdline_row - 1) * cmdline_width + sc_col - 1; if (room > 0 && (force || (shortmess(SHM_TRUNC) && !exmode_active)) && (n = (int)STRLEN(s) - room) > 0) { @@ -1368,7 +1368,7 @@ wait_return(int redraw) c = K_IGNORE; msg_col = #ifdef FEAT_RIGHTLEFT - cmdmsg_rl ? Columns - 1 : + cmdmsg_rl ? cmdline_width - 1 : #endif 0; } @@ -1472,7 +1472,7 @@ wait_return(int redraw) lines_left = -1; // reset lines_left at next msg_start() reset_last_sourcing(); if (keep_msg != NULL && vim_strsize(keep_msg) >= - (Rows - cmdline_row - 1) * Columns + sc_col) + (Rows - cmdline_row - 1) * cmdline_width + sc_col) VIM_CLEAR(keep_msg); // don't redisplay message, it's too long if (tmpState == MODE_SETWSIZE) // got resize event while in vgetc() @@ -1586,7 +1586,7 @@ msg_start(void) msg_row = cmdline_row; msg_col = #ifdef FEAT_RIGHTLEFT - cmdmsg_rl ? Columns - 1 : + cmdmsg_rl ? cmdline_width - 1 : #endif 0; } @@ -2228,21 +2228,21 @@ screen_puts_mbyte(char_u *s, int l, int attr) #ifdef FEAT_RIGHTLEFT cmdmsg_rl ? msg_col <= 1 : #endif - msg_col == Columns - 1)) + msg_col == cmdline_width - 1)) { // Doesn't fit, print a highlighted '>' to fill it up. msg_screen_putchar('>', HL_ATTR(HLF_AT)); return s; } - screen_puts_len(s, l, msg_row, msg_col, attr); + screen_puts_len(s, l, msg_row, cmdline_col_off + msg_col, attr); #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) { msg_col -= cw; if (msg_col == 0) { - msg_col = Columns; + msg_col = cmdline_width; ++msg_row; } } @@ -2250,7 +2250,7 @@ screen_puts_mbyte(char_u *s, int l, int attr) #endif { msg_col += cw; - if (msg_col >= Columns) + if (msg_col >= cmdline_width) { msg_col = 0; ++msg_row; @@ -2286,7 +2286,7 @@ msg_outtrans_long_len_attr(char_u *longstr, int len, int attr) int slen = len; int room; - room = Columns - msg_col; + room = cmdline_width - msg_col; if (len > room && room >= 20) { slen = (room - 3) / 2; @@ -2497,10 +2497,11 @@ msg_puts_display( || (has_mbyte && (*mb_ptr2cells)(s) > 1 && msg_col <= 2)) : #endif - ((*s != '\r' && msg_col + t_col >= Columns - 1) - || (*s == TAB && msg_col + t_col >= ((Columns - 1) & ~7)) + ((*s != '\r' && msg_col + t_col >= cmdline_width - 1) + || (*s == TAB && msg_col + t_col + >= ((cmdline_width - 1) & ~7)) || (has_mbyte && (*mb_ptr2cells)(s) > 1 - && msg_col + t_col >= Columns - 2))))) + && msg_col + t_col >= cmdline_width - 2))))) { /* * The screen is scrolled up when at the last row (some terminals @@ -2533,8 +2534,8 @@ msg_puts_display( msg_scroll_up(); msg_row = Rows - 2; - if (msg_col >= Columns) // can happen after screen resize - msg_col = Columns - 1; + if (msg_col >= cmdline_width) // can happen after screen resize + msg_col = cmdline_width - 1; // Display char in last column before showing more-prompt. if (*s >= ' ' @@ -2602,9 +2603,9 @@ msg_puts_display( } wrap = *s == '\n' - || msg_col + t_col >= Columns + || msg_col + t_col >= cmdline_width || (has_mbyte && (*mb_ptr2cells)(s) > 1 - && msg_col + t_col >= Columns - 1); + && msg_col + t_col >= cmdline_width - 1); if (t_col > 0 && (wrap || *s == '\r' || *s == '\b' || *s == '\t' || *s == BELL)) { @@ -2643,7 +2644,7 @@ msg_puts_display( msg_didout = FALSE; // remember that line is empty #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) - msg_col = Columns - 1; + msg_col = cmdline_width - 1; else #endif msg_col = 0; @@ -2699,7 +2700,7 @@ msg_puts_display( # ifdef FEAT_RIGHTLEFT cmdmsg_rl || # endif - (cw > 1 && msg_col + t_col >= Columns - 1)) + (cw > 1 && msg_col + t_col >= cmdline_width - 1)) { if (l > 1) s = screen_puts_mbyte(s, l, attr) - 1; @@ -2781,8 +2782,8 @@ msg_scroll_up(void) // Scrolling up doesn't result in the right background. Set the // background here. It's not efficient, but avoids that we have to do // it all over the code. - screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, - ' ', ' ', HL_ATTR(HLF_MSG)); + screen_fill((int)Rows - 1, (int)Rows, cmdline_col_off, + cmdline_col_off + cmdline_width, ' ', ' ', HL_ATTR(HLF_MSG)); // Also clear the last char of the last but one line if it was not // cleared before to avoid a scroll-up. @@ -3068,7 +3069,8 @@ disp_sb_line(int row, msgchunk_T *smp, int clear_to_eol) // If clearing the screen did not work (e.g. because of a background // color and t_ut isn't set) clear until the last column here. if (clear_to_eol) - screen_fill(row, row + 1, msg_col, (int)Columns, + screen_fill(row, row + 1, + cmdline_col_off + msg_col, cmdline_col_off + cmdline_width, ' ', ' ', HL_ATTR(HLF_MSG)); if (mp->sb_eol || mp->sb_next == NULL) @@ -3090,14 +3092,15 @@ t_puts( { // output postponed text msg_didout = TRUE; // remember that line is not empty - screen_puts_len(t_s, (int)(s - t_s), msg_row, msg_col, attr); + screen_puts_len(t_s, (int)(s - t_s), msg_row, cmdline_col_off + msg_col, + attr); msg_col += *t_col; *t_col = 0; // If the string starts with a composing character don't increment the // column position for it. if (enc_utf8 && utf_iscomposing(utf_ptr2char(t_s))) --msg_col; - if (msg_col >= Columns) + if (msg_col >= cmdline_width) { msg_col = 0; ++msg_row; @@ -3173,7 +3176,7 @@ msg_puts_printf(char_u *str, int maxlen) if (cmdmsg_rl) { if (*s == CAR || *s == NL) - msg_col = Columns - 1; + msg_col = cmdline_width - 1; else --msg_col; } @@ -3451,7 +3454,8 @@ do_more_prompt(int typed_char) // scroll up, display line at bottom msg_scroll_up(); inc_msg_scrolled(); - screen_fill((int)Rows - 2, (int)Rows - 1, 0, (int)Columns, + screen_fill((int)Rows - 2, (int)Rows - 1, + cmdline_col_off, cmdline_col_off + cmdline_width, ' ', ' ', msg_attr); mp_last = disp_sb_line((int)Rows - 2, mp_last, FALSE); --toscroll; @@ -3461,8 +3465,8 @@ do_more_prompt(int typed_char) if (toscroll <= 0) { // displayed the requested text, more prompt again - screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, - ' ', ' ', msg_attr); + screen_fill((int)Rows - 1, (int)Rows, cmdline_col_off, + cmdline_col_off + cmdline_width, ' ', ' ', msg_attr); msg_moremsg(FALSE); continue; } @@ -3475,7 +3479,8 @@ do_more_prompt(int typed_char) } // clear the --more-- message - screen_fill((int)Rows - 1, (int)Rows, 0, (int)Columns, ' ', ' ', msg_attr); + screen_fill((int)Rows - 1, (int)Rows, cmdline_col_off, + cmdline_col_off + cmdline_width, ' ', ' ', msg_attr); State = oldState; setmouse(); if (quit_more) @@ -3485,7 +3490,7 @@ do_more_prompt(int typed_char) } #ifdef FEAT_RIGHTLEFT else if (cmdmsg_rl) - msg_col = Columns - 1; + msg_col = cmdline_width - 1; #endif entered = FALSE; @@ -3698,20 +3703,20 @@ mch_msg(char *str) msg_screen_putchar(int c, int attr) { msg_didout = TRUE; // remember that line is not empty - screen_putchar(c, msg_row, msg_col, attr); + screen_putchar(c, msg_row, cmdline_col_off + msg_col, attr); #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) { if (--msg_col == 0) { - msg_col = Columns; + msg_col = cmdline_width; ++msg_row; } } else #endif { - if (++msg_col >= Columns) + if (++msg_col >= cmdline_width) { msg_col = 0; ++msg_row; @@ -3726,11 +3731,11 @@ msg_moremsg(int full) char_u *s = (char_u *)_("-- More --"); attr = HL_ATTR(HLF_M); - screen_puts(s, (int)Rows - 1, 0, attr); + screen_puts(s, (int)Rows - 1, cmdline_col_off, attr); if (full) screen_puts((char_u *) _(" SPACE/d/j: screen/page/line down, b/u/k: up, q: quit "), - (int)Rows - 1, vim_strsize(s), attr); + (int)Rows - 1, cmdline_col_off + vim_strsize(s), attr); } /* @@ -3754,7 +3759,7 @@ repeat_message(void) #endif else if (State == MODE_EXTERNCMD) { - windgoto(msg_row, msg_col); // put cursor back + windgoto(msg_row, cmdline_col_off + msg_col); // put cursor back } else if (State == MODE_HITRETURN || State == MODE_SETWSIZE) { @@ -3786,8 +3791,8 @@ msg_check_screen(void) if (msg_row >= Rows) msg_row = Rows - 1; - if (msg_col >= Columns) - msg_col = Columns - 1; + if (msg_col >= cmdline_width) + msg_col = cmdline_width - 1; return TRUE; } @@ -3833,17 +3838,21 @@ msg_clr_eos_force(void) #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) { - screen_fill(msg_row, msg_row + 1, 0, msg_col + 1, + screen_fill(msg_row, msg_row + 1, + cmdline_col_off, cmdline_col_off + msg_col + 1, ' ', ' ', msg_attr); - screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns, + screen_fill(msg_row + 1, (int)Rows, + cmdline_col_off, cmdline_col_off + cmdline_width, ' ', ' ', msg_attr); } else #endif { - screen_fill(msg_row, msg_row + 1, msg_col, (int)Columns, + screen_fill(msg_row, msg_row + 1, + cmdline_col_off + msg_col, cmdline_col_off + cmdline_width, ' ', ' ', msg_attr); - screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns, + screen_fill(msg_row + 1, (int)Rows, + cmdline_col_off, cmdline_col_off + cmdline_width, ' ', ' ', msg_attr); } } @@ -4152,11 +4161,11 @@ msg_advance(int col) msg_col = col; // for redirection, may fill it up later return; } - if (col >= Columns) // not enough room - col = Columns - 1; + if (col >= cmdline_width) // not enough room + col = cmdline_width - 1; #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) - while (msg_col > Columns - col) + while (msg_col > cmdline_width - col) msg_putchar(' '); else #endif diff --git a/src/misc1.c b/src/misc1.c index 8af50fc5a5..3ef007c357 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1017,7 +1017,7 @@ get_number( ++allow_keys; // no mapping here, but recognize keys for (;;) { - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); c = safe_vgetc(); if (VIM_ISDIGIT(c)) { @@ -2283,7 +2283,7 @@ prepare_to_exit(void) else #endif { - windgoto((int)Rows - 1, 0); + windgoto((int)Rows - 1, cmdline_col_off); /* * Switch terminal mode back now, so messages end up on the "normal" diff --git a/src/mouse.c b/src/mouse.c index d73e831d36..4bd1e592fc 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -484,9 +484,8 @@ do_mouse( // Check for clicking in the tab page panel. #if defined(FEAT_TABPANEL) - if (mouse_row < firstwin->w_winrow + topframe->fr_height - && (mouse_col < firstwin->w_wincol - || mouse_col >= firstwin->w_wincol + topframe->fr_width)) + if (mouse_col < firstwin->w_wincol + || mouse_col >= firstwin->w_wincol + topframe->fr_width) { tp_label.is_panel = true; tp_label.just_in = true; diff --git a/src/normal.c b/src/normal.c index 0f336a276d..59843293e5 100644 --- a/src/normal.c +++ b/src/normal.c @@ -1856,12 +1856,13 @@ display_showcmd(void) else // 'showcmdloc' is "last" or empty { if (!showcmd_is_clear) - screen_puts(showcmd_buf, (int)Rows - 1, sc_col, 0); + screen_puts(showcmd_buf, (int)Rows - 1, + cmdline_col_off + sc_col, 0); // clear the rest of an old message by outputting up to SHOWCMD_COLS // spaces screen_puts((char_u *)" " + len, - (int)Rows - 1, sc_col + len, 0); + (int)Rows - 1, cmdline_col_off + sc_col + len, 0); } setcursor(); // put cursor back where it belongs diff --git a/src/os_unix.c b/src/os_unix.c index 829219d8ec..fdae5d67fa 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -3753,7 +3753,7 @@ exit_scroll(void) { restore_cterm_colors(); // get original colors back msg_clr_eos_force(); // clear the rest of the display - windgoto((int)Rows - 1, 0); // may have moved the cursor + windgoto((int)Rows - 1, cmdline_col_off); // may have moved the cursor } } @@ -5556,7 +5556,7 @@ mch_call_shell_fork( else msg_outtrans_len(ta_buf + i, 1); } - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); out_flush(); } @@ -5678,7 +5678,7 @@ mch_call_shell_fork( msg_puts((char *)buffer); } - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); cursor_on(); out_flush(); if (got_int) diff --git a/src/os_win32.c b/src/os_win32.c index 43a3da5d87..182d005aa8 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -4436,7 +4436,7 @@ handler_routine( case CTRL_CLOSE_EVENT: case CTRL_LOGOFF_EVENT: case CTRL_SHUTDOWN_EVENT: - windgoto((int)Rows - 1, 0); + windgoto((int)Rows - 1, cmdline_col_off); g_fForceExit = TRUE; vim_snprintf((char *)IObuff, IOSIZE, _("Vim: Caught %s event\n"), @@ -5058,7 +5058,7 @@ dump_pipe(int options, msg_puts((char *)buffer); } - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); cursor_on(); out_flush(); } @@ -5257,7 +5257,7 @@ mch_system_piped(char *cmd, int options) else msg_outtrans_len(ta_buf + i, 1); } - windgoto(msg_row, msg_col); + windgoto(msg_row, cmdline_col_off + msg_col); out_flush(); ta_len += len; diff --git a/src/screen.c b/src/screen.c index 80da91c53c..bbb4bbaaf4 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1060,7 +1060,7 @@ win_redr_custom( row = statusline_row(wp); fillchar = fillchar_status(&attr, wp); int in_status_line = wp->w_status_height != 0; - maxwidth = in_status_line ? wp->w_width : Columns; + maxwidth = in_status_line ? wp->w_width : cmdline_width; if (draw_ruler) { @@ -1077,7 +1077,7 @@ win_redr_custom( if (*stl++ != '(') stl = p_ruf; } - col = ru_col - (Columns - maxwidth); + col = ru_col - (cmdline_width - maxwidth); if (col < (maxwidth + 1) / 2) col = (maxwidth + 1) / 2; maxwidth -= col; @@ -1103,6 +1103,8 @@ win_redr_custom( if (in_status_line) col += wp->w_wincol; + else + col += cmdline_col_off; } if (maxwidth <= 0) @@ -1187,7 +1189,7 @@ win_redr_custom( p = tabtab[n].start; fillchar = tabtab[n].userhl; } - while (col < Columns) + while (col < firstwin->w_wincol + topframe->fr_width) TabPageIdxs[col++] = fillchar; } @@ -2325,14 +2327,16 @@ screen_fill( if (row == Rows - 1) // overwritten the command line { redraw_cmdline = TRUE; - if (start_col == 0 && end_col == Columns + if (((start_col == 0 && end_col == Columns) + || (start_col <= cmdline_col_off + && end_col == cmdline_col_off + cmdline_width)) && c1 == ' ' && c2 == ' ' && attr == 0 #ifdef FEAT_PROP_POPUP && !popup_overlaps_cmdline() #endif ) clear_cmdline = FALSE; // command line has been cleared - if (start_col == 0) + if (start_col == 0 || start_col == cmdline_col_off) mode_displayed = FALSE; // mode cleared or overwritten } } @@ -2725,8 +2729,8 @@ give_up: msg_row = Rows - 1; // put cursor at last row else if (Rows > old_Rows) // Rows got bigger msg_row += Rows - old_Rows; // put cursor in same place - if (msg_col >= Columns) // Columns got smaller - msg_col = Columns - 1; // put cursor at last column + if (msg_col >= cmdline_width) // cmdline_width got smaller + msg_col = cmdline_width - 1; // put cursor at last cmdline column } #endif clear_TabPageIdxs(); @@ -4097,7 +4101,7 @@ showmode(void) { // These messages can get long, avoid a wrap in a narrow // window. Prefer showing edit_submode_extra. - length = (Rows - msg_row) * Columns - 3; + length = (Rows - msg_row) * cmdline_width - 3; if (edit_submode_extra != NULL) length -= vim_strsize(edit_submode_extra); if (length > 0) @@ -4611,8 +4615,8 @@ comp_col(void) if (!p_ru || last_has_status) // no need for separating space ++sc_col; } - sc_col = Columns - sc_col; - ru_col = Columns - ru_col; + sc_col = cmdline_width - sc_col; + ru_col = cmdline_width - ru_col; if (sc_col <= 0) // screen too narrow, will become a mess sc_col = 1; if (ru_col <= 0) diff --git a/src/search.c b/src/search.c index ede51f5f0f..0855891b0a 100644 --- a/src/search.c +++ b/src/search.c @@ -1478,10 +1478,11 @@ do_search( // msg_strtrunc() will shorten in the middle. if (msg_scrolled != 0 && !cmd_silent) // Use all the columns. - msgbufsize = (int)(Rows - msg_row) * Columns - 1; + msgbufsize = (int)(Rows - msg_row) * cmdline_width - 1; else // Use up to 'showcmd' column. - msgbufsize = (int)(Rows - msg_row - 1) * Columns + sc_col - 1; + msgbufsize = (int)(Rows - msg_row - 1) * cmdline_width + + sc_col - 1; if (msgbufsize < plen + off_len + SEARCH_STAT_BUF_LEN + 3) msgbufsize = plen + off_len + SEARCH_STAT_BUF_LEN + 3; } diff --git a/src/spellsuggest.c b/src/spellsuggest.c index 9383c93b7f..87efd0d5b2 100644 --- a/src/spellsuggest.c +++ b/src/spellsuggest.c @@ -568,7 +568,7 @@ spell_suggest(int count) // When 'rightleft' is set the list is drawn right-left. cmdmsg_rl = curwin->w_p_rl; if (cmdmsg_rl) - msg_col = Columns - 1; + msg_col = cmdline_width - 1; #endif // List the suggestions. diff --git a/src/syntax.c b/src/syntax.c index c44ccad68a..ed4c1225f3 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -4085,8 +4085,8 @@ syn_list_cluster(int id) if (msg_col >= endcol) // output at least one space endcol = msg_col + 1; - if (Columns <= (long)endcol) // avoid hang for tiny window - endcol = (int)(Columns - 1); + if (cmdline_width <= endcol) // avoid hang for tiny window + endcol = cmdline_width - 1; msg_advance(endcol); if (SYN_CLSTR(curwin->w_s)[id].scl_list != NULL) diff --git a/src/tabpanel.c b/src/tabpanel.c index 867171e46f..f2bccea1b9 100644 --- a/src/tabpanel.c +++ b/src/tabpanel.c @@ -163,7 +163,7 @@ draw_tabpanel(void) do_by_tplmode(TPLMODE_REDRAW, VERT_LEN, maxwidth, &curtab_row, NULL); // draw vert separator in tabpanel - for (vsrow = 0; vsrow < cmdline_row; vsrow++) + for (vsrow = 0; vsrow < Rows; vsrow++) screen_putchar(curwin->w_fill_chars.tpl_vert, vsrow, topframe->fr_width, vs_attr); } @@ -175,7 +175,7 @@ draw_tabpanel(void) do_by_tplmode(TPLMODE_REDRAW, 0, maxwidth - VERT_LEN, &curtab_row, NULL); // draw vert separator in tabpanel - for (vsrow = 0; vsrow < cmdline_row; vsrow++) + for (vsrow = 0; vsrow < Rows; vsrow++) screen_putchar(curwin->w_fill_chars.tpl_vert, vsrow, maxwidth - VERT_LEN, vs_attr); } @@ -516,7 +516,7 @@ do_by_tplmode( typval_T v; tabpanel_T args; - args.maxrow = cmdline_row; + args.maxrow = Rows; args.offsetrow = 0; args.col_start = col_start; args.col_end = col_end; diff --git a/src/tag.c b/src/tag.c index 58e12a668e..23573fe88d 100644 --- a/src/tag.c +++ b/src/tag.c @@ -975,7 +975,7 @@ print_tag_list( taglen = (int)(tagp.tagname_end - tagp.tagname + 2); if (taglen < 18) taglen = 18; - if (taglen > Columns - 25) + if (taglen > cmdline_width - 25) taglen = MAXCOL; if (msg_col == 0) msg_didout = FALSE; // overwrite previous message @@ -1055,7 +1055,7 @@ print_tag_list( attr = HL_ATTR(HLF_CM); while (*p && *p != '\r' && *p != '\n') { - if (msg_col + ptr2cells(p) >= Columns) + if (msg_col + ptr2cells(p) >= cmdline_width) { msg_putchar('\n'); if (got_int) @@ -1103,7 +1103,7 @@ print_tag_list( while (p != command_end) { - if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > Columns) + if (msg_col + (*p == TAB ? 1 : ptr2cells(p)) > cmdline_width) msg_putchar('\n'); if (got_int) break; diff --git a/src/testdir/dumps/Test_tabpanel_commandline_0.dump b/src/testdir/dumps/Test_tabpanel_commandline_0.dump index 5ed359c4bb..72e888d553 100644 --- a/src/testdir/dumps/Test_tabpanel_commandline_0.dump +++ b/src/testdir/dumps/Test_tabpanel_commandline_0.dump @@ -6,5 +6,5 @@ | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 -|a+0#0000001#ffff4012|b@1|r|e|v|i|a|t|e| +3#0000000#ffffff0@1|a|b|c|l|e|a|r| @1|a|b|o|v|e|l|e|f|t| @1|a|b|s|t|r|a|c|t| @4 -|:+0&&|a|b@1|r|e|v|i|a|t|e> @33 +| +1#0000000&@9|a+0#0000001#ffff4012|b@1|r|e|v|i|a|t|e| +3#0000000#ffffff0@1|a|b|c|l|e|a|r| @1|a|b|o|v|e|l|e|f|t| @1|>| @1 +| +1&&@9|:+0&&|a|b@1|r|e|v|i|a|t|e> @23 diff --git a/src/testdir/dumps/Test_tabpanel_commandline_1.dump b/src/testdir/dumps/Test_tabpanel_commandline_1.dump index a44f54eed4..0e10d3dfeb 100644 --- a/src/testdir/dumps/Test_tabpanel_commandline_1.dump +++ b/src/testdir/dumps/Test_tabpanel_commandline_1.dump @@ -3,8 +3,8 @@ | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 -| +0#0000001#e0e0e08|a|b@1|r|e|v|i|a|t|e| @4| +0#4040ff13#ffffff0@28 -| +0#0000001#ffd7ff255|a|b|c|l|e|a|r| @7| +0#4040ff13#ffffff0@28 -| +0#0000001#ffd7ff255|a|b|o|v|e|l|e|f|t| @5| +0#4040ff13#ffffff0@28 -| +0#0000001#ffd7ff255|a|b|s|t|r|a|c|t| @6| +0#4040ff13#ffffff0@28 -|:+0#0000000&|a|b@1|r|e|v|i|a|t|e> @33 +| +1#0000000&@9| +0#0000001#e0e0e08|a|b@1|r|e|v|i|a|t|e| @4| +0#4040ff13#ffffff0@18 +| +1#0000000&@9| +0#0000001#ffd7ff255|a|b|c|l|e|a|r| @7| +0#4040ff13#ffffff0@18 +| +1#0000000&@9| +0#0000001#ffd7ff255|a|b|o|v|e|l|e|f|t| @5| +0#4040ff13#ffffff0@18 +| +1#0000000&@9| +0#0000001#ffd7ff255|a|b|s|t|r|a|c|t| @6| +0#4040ff13#ffffff0@18 +| +1#0000000&@9|:+0&&|a|b@1|r|e|v|i|a|t|e> @23 diff --git a/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump b/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump index 6076978d05..5eea1822db 100644 --- a/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump +++ b/src/testdir/dumps/Test_tabpanel_dont_overflow_into_tabpanel_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 -| +0#0000000&@26|1|,|1| @10|A|l@1| +| +1#0000000&@9| +0&&@17|1|,|1| @9|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_drawing_01.dump b/src/testdir/dumps/Test_tabpanel_drawing_01.dump index 74ba073e0a..351d9fe0ac 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_01.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_01.dump @@ -3,4 +3,4 @@ | +1#0000000&@15|~+0#4040ff13&| @27 | +1#0000000&@15|~+0#4040ff13&| @27 | +1#0000000&@15|~+0#4040ff13&| @27 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +| +1#0000000&@15| +0&&@14|0|,|0|-|1| @4|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_drawing_02.dump b/src/testdir/dumps/Test_tabpanel_drawing_02.dump index f7567dc3b9..d8a4242d91 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_02.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_02.dump @@ -3,4 +3,4 @@ | +1#0000000&@15|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6 | +1#0000000&@15|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6 | +1#0000000&@15|<+3&&|a|b|p|a|n|e|l|1| |0|,|0|-|1| @1|A|l@1| |<+1&&|l|1| |0|,|0|- -| +0&&@44 +| @15| +0&&@28 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_03.dump b/src/testdir/dumps/Test_tabpanel_drawing_03.dump index cb67b9e9b3..c4fcc5cbde 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_03.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_03.dump @@ -3,4 +3,4 @@ | +1&&@15|c+0&&| @18||+1&&|c+0&&| @6 | +1&&@15|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6 | +1#0000000&@15|<+3&&|n|e|l|1| |[|+|]| |1|,|1| @3|A|l@1| |<+1&&|+|]| |1|,|1| -| +0&&@44 +@16| +0&&@28 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_04.dump b/src/testdir/dumps/Test_tabpanel_drawing_04.dump index dd3c82e1a6..507c244eea 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_04.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_04.dump @@ -3,4 +3,4 @@ | +1&&@15|f+0&&| @27 | +1&&@15|~+0#4040ff13&| @27 | +1#0000000&@15|~+0#4040ff13&| @27 -| +0#0000000&@26|1|,|1| @10|A|l@1| +| +1#0000000&@15| +0&&@14|1|,|1| @6|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_drawing_05.dump b/src/testdir/dumps/Test_tabpanel_drawing_05.dump index 08e040bdfd..971eb9320a 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_05.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_05.dump @@ -3,4 +3,4 @@ | +2&&@15|f+0&&| @27 |2+2&&|:|X+0#4040ff13&|t|a|b|p|a|n|e|l|2| +2#0000000&@3|~+0#4040ff13&| @27 | +1#0000000&@15|~+0#4040ff13&| @27 -| +0#0000000&@26|1|,|1| @10|A|l@1| +| +1#0000000&@15| +0&&@14|1|,|1| @6|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_drawing_06.dump b/src/testdir/dumps/Test_tabpanel_drawing_06.dump index b5935d37c3..f7e535724b 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_06.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_06.dump @@ -3,4 +3,4 @@ |f+0#0000000#ffffff0| @27| +2&&@15 |~+0#4040ff13&| @27|2+2#0000000&|:|X+0#4040ff13&|t|a|b|p|a|n|e|l|2| +2#0000000&@3 |~+0#4040ff13&| @27| +1#0000000&@15 -| +0&&@26|1|,|1| @10|A|l@1| +| +0&&@14|1|,|1| @6|A|l@1| | +1&&@15 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_07.dump b/src/testdir/dumps/Test_tabpanel_drawing_07.dump index 440988b6ea..e1e44632f8 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_07.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_07.dump @@ -3,4 +3,4 @@ |~+0#4040ff13#ffffff0| @27| +8#0000001#e0e0e08@15 |~+0#4040ff13#ffffff0| @27|2+8#0000001#e0e0e08|:|X+0#4040ff13#ffffff0|t|a|b|p|a|n|e|l|2| +8#0000001#e0e0e08@3 |~+0#4040ff13#ffffff0| @27| +2#0000000&@15 -| +0&&@26|0|,|0|-|1| @8|A|l@1| +| +0&&@14|0|,|0|-|1| @4|A|l@1| |<+2&&|!+0#4040ff13&|p|t|y| |[|T|e|r|m|i|n|a|l|] diff --git a/src/testdir/dumps/Test_tabpanel_drawing_08.dump b/src/testdir/dumps/Test_tabpanel_drawing_08.dump index 57bbf923eb..ae3cadbb1c 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_08.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_08.dump @@ -3,4 +3,4 @@ |c+0&&| @18||+1&&|c+0&&| @6| +1&&@15 |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @6| +1#0000000&@15 |<+3&&|n|e|l|1| |[|+|]| |1|,|1| @3|A|l@1| |<+1&&|+|]| |1|,|1| @16 -| +0&&@26|1|,|1| @10|A|l@1| +| +0&&@14|1|,|1| @6|A|l@1| | +1&&@15 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump b/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump index 8dee217e3e..23fe3c8e47 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_2_0.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @56||+1#0000000&| @18 |~+0#4040ff13&| @56||+1#0000000&| @18 |~+0#4040ff13&| @56||+1#0000000&| @18 -|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@47|2|,|1| @10|A|l@1| +|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@27|2|,|1| @10|A|l@1| ||+1&&| @18 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump b/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump index c3d257dc64..d82adb29a8 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_2_1.dump @@ -7,4 +7,4 @@ | +1#0000000&@18|||~+0#4040ff13&| @56 | +1#0000000&@18|||~+0#4040ff13&| @56 | +1#0000000&@18|||~+0#4040ff13&| @56 -|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@47|2|,|1| @10|A|l@1| +| +1#0000000&@18|||-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@27|2|,|1| @10|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump b/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump index 4ca56d4191..e349d118ab 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_fill_tailing_0.dump @@ -7,4 +7,4 @@ |b+2#0000000&@2|.|t|x|t| @12|~+0#4040ff13&| @23 |B+2#0000000&|O|T@1|O|M| @13|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +| +1#0000000&@19| +0&&@12|0|,|0|-|1| @2|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump b/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump index d98dbfdd65..716f720e76 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_pum_0.dump @@ -7,4 +7,4 @@ | +1&&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -|-+2#0000000&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@29 +| +1#0000000&@19|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@9 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump b/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump index 17e0c971f7..d481d6bcf0 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_pum_1.dump @@ -7,4 +7,4 @@ | +1&&@19| +0&&@1|a@2|b> @18 | +1&&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -|-+2#0000000&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@29 +| +1#0000000&@19|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@9 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump b/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump index 4ea7b9140a..16898d03c5 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_pum_2.dump @@ -7,4 +7,4 @@ | +0&&@21| +0#0000001#ffd7ff255|a@2|b| @10| +1#0000000#ffffff0@6 | +0&&@22|a@1| +1&&@19 >~+0#4040ff13&| @23| +1#0000000&@19 -|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@29 +|-+2&&@1| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@9| +1&&@19 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump index fa1947eb47..3d9a57b4e4 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19| +0#af5f00255&|1|5| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t||+1&&| +0#af5f00255&@1|7| | +1#0000000&@19| +0#af5f00255&|1|6| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t||+1&&| +0#af5f00255&@1|8| | +1#0000000&@19|<+3&&|.|t|x|t| |[|+|]| |1|2|,|1| @3|8|%| |<+1&&| |1|, -| +0&&@44 +| @19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump index 6370449b63..460ba30fcb 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_1.dump @@ -7,4 +7,4 @@ | +1&&@19| +0#af5f00255&|1|7| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t|e|x|t| @1 | +1&&@19| +0#af5f00255&|1|8| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t|e|x|t| @1 | +1&&@19|b+3&&@2|.|t|x|t| |[|+|]| @1|1|6|,|1| @4|1|4|% -| +0&&@44 +| +1&&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump index 50b55ea419..d4afaf7f36 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_2.dump @@ -7,4 +7,4 @@ | +1&&@19| +0#af5f00255&@1|2| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t|e|x|t| @1 | +1&&@19| +0#af5f00255&@1|3| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t|e|x|t| @1 | +1&&@19|b@2|.|t|x|t| |[|+|]| @1|1|,|1| @5|T|o|p -| +0&&@44 +| @19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump index fdde1ab7c7..b041b672f6 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_scrolling_3.dump @@ -7,4 +7,4 @@ | +1&&@19| +0#af5f00255&@1|7| ||+1#0000000&| +0#af5f00255&|3|1| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t | +1&&@19| +0#af5f00255&@1|8| ||+1#0000000&| +0#af5f00255&|3|2| |t+0#0000000&|e|x|t| |t|e|x|t| |t|e|x|t| |t | +1&&@19|<| |1|,| |<+3&&|.|t|x|t| |[|+|]| |2|8|,|1| @2|2|6|% -| +0&&@44 +| +1&&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump index 72cf385acb..6553f54ba2 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_1.dump @@ -7,4 +7,4 @@ | +1&&@19|.+0&&@24 | +1&&@19|.+0&&@24 | +1&&@19|.+0&&@24 -| @44 +| +1&&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump index bee1803c7e..20882dc297 100644 --- a/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump +++ b/src/testdir/dumps/Test_tabpanel_drawing_with_popupwin_2.dump @@ -7,4 +7,4 @@ |.+0&&@24| +1&&@19 |.+0&&@24| +1&&@19 |.+0&&@24| +1&&@19 -| +0&&@44 +| +0&&@24| +1&&@19 diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_0.dump b/src/testdir/dumps/Test_tabpanel_equalalways_0.dump index 62a9b40162..90888895f7 100644 --- a/src/testdir/dumps/Test_tabpanel_equalalways_0.dump +++ b/src/testdir/dumps/Test_tabpanel_equalalways_0.dump @@ -7,4 +7,4 @@ | +1&&@19|~+0#4040ff13&| @56 | +1#0000000&@19|~+0#4040ff13&| @56 | +1#0000000&@19|[|N|o| |N|a|m|e|]| @30|0|,|0|-|1| @9|A|l@1 -| +0&&@77 +| @19| +0&&@57 diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_1.dump b/src/testdir/dumps/Test_tabpanel_equalalways_1.dump index 2ebcacee9c..ba228e327a 100644 --- a/src/testdir/dumps/Test_tabpanel_equalalways_1.dump +++ b/src/testdir/dumps/Test_tabpanel_equalalways_1.dump @@ -7,4 +7,4 @@ | +1&&@9|~+0#4040ff13&| @66 | +1#0000000&@9|~+0#4040ff13&| @66 | +1#0000000&@9|[|N|o| |N|a|m|e|]| @40|0|,|0|-|1| @9|A|l@1 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|1|0| @50 +| @9| +0&&@67 diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_2.dump b/src/testdir/dumps/Test_tabpanel_equalalways_2.dump index baf8239377..bf6a6900fc 100644 --- a/src/testdir/dumps/Test_tabpanel_equalalways_2.dump +++ b/src/testdir/dumps/Test_tabpanel_equalalways_2.dump @@ -7,4 +7,4 @@ | +1&&@29|~+0#4040ff13&| @46 | +1#0000000&@29|~+0#4040ff13&| @46 | +1#0000000&@29|[|N|o| |N|a|m|e|]| @20|0|,|0|-|1| @9|A|l@1 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|3|0| @50 +| @29| +0&&@47 diff --git a/src/testdir/dumps/Test_tabpanel_equalalways_3.dump b/src/testdir/dumps/Test_tabpanel_equalalways_3.dump index c7f5f4ce74..b8c80524fa 100644 --- a/src/testdir/dumps/Test_tabpanel_equalalways_3.dump +++ b/src/testdir/dumps/Test_tabpanel_equalalways_3.dump @@ -7,4 +7,4 @@ | +1&&@4|~+0#4040ff13&| @71 | +1#0000000&@4|~+0#4040ff13&| @71 | +1#0000000&@4|[|N|o| |N|a|m|e|]| @45|0|,|0|-|1| @9|A|l@1 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|5| @51 +| @4| +0&&@72 diff --git a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump index dd930c451d..a8df2d1f19 100644 --- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump +++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@8|||~+0#4040ff13&| @33 | +1#0000000&@8|||~+0#4040ff13&| @33 | +1#0000000&@8|||$+3&&| @13|[|c@2|]| @13|$ -|"+0&&|c@2|"| |[|N|e|w|]| @33 +| +1&&@8|||"+0&&|c@2|"| |[|N|e|w|]| @23 diff --git a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump index 21bb63b845..7285afbeeb 100644 --- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump +++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_statusline_tabline_1.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @33||+1#0000000&| @8 |~+0#4040ff13&| @33||+1#0000000&| @8 |$+3&&| @13|[|c@2|]| @13|$||+1&&| @8 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|+|=|a|l|i|g|n|:|r|i|g|h|t| @15 +| +0&&@34||+1&&| @8 diff --git a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump index b062f214de..80f06ce745 100644 --- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump +++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_0.dump @@ -7,4 +7,4 @@ |t+2#0000000&|o|p| @6|~+0#4040ff13&| @33 |$+2#0000000&| |[|c@2|]| @1|$|~+0#4040ff13&| @33 |b+2#0000000&|o|t@1|o|m| @3|~+0#4040ff13&| @33 -|"+0#0000000&|c@2|"| |[|N|e|w|]| @33 +| +1#0000000&@9|"+0&&|c@2|"| |[|N|e|w|]| @23 diff --git a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump index 4e5a3fb1d8..bf381f6693 100644 --- a/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump +++ b/src/testdir/dumps/Test_tabpanel_eval_tabpanel_with_linebreaks_1.dump @@ -7,4 +7,4 @@ |~+0#4040ff13#ffffff0| @33|t+2#0000000&|o|p| @6 |~+0#4040ff13&| @33|$+2#0000000&| |[|c@2|]| @1|$ |~+0#4040ff13&| @33|b+2#0000000&|o|t@1|o|m| @3 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|+|=|a|l|i|g|n|:|r|i|g|h|t| @15 +| +0&&@34| +1&&@9 diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump b/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump index d5a0e4a00c..8188e27b93 100644 --- a/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump +++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_0.dump @@ -7,4 +7,4 @@ |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump b/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump index d946a3190d..f56777d0bd 100644 --- a/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump +++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_1.dump @@ -7,4 +7,4 @@ |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump b/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump index 74b2b7b4e3..03f40f6647 100644 --- a/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump +++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_2.dump @@ -7,4 +7,4 @@ |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump b/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump index 037a53a329..4c61f789fd 100644 --- a/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump +++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_3.dump @@ -7,4 +7,4 @@ |7+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |8+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 |9+8#0000001#e0e0e08|:|t|a|b| @4|~+0#4040ff13#ffffff0| @33 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +|1+8#0000001#e0e0e08|0|:|t|a|b| @3| +0#0000000#ffffff0@17|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump b/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump index 70905a6b94..aa1ae3e18b 100644 --- a/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump +++ b/src/testdir/dumps/Test_tabpanel_many_tabpages_4.dump @@ -1,5 +1,4 @@ -|1+8#0000001#e0e0e08|0|:|t|a|b| @3> +0#0000000#ffffff0@34 -|1+2&&@1|:|t|a|b| @3|~+0#4040ff13&| @33 +|1+2&#ffffff0@1|:|t|a|b| @3> +0&&@34 |1+8#0000001#e0e0e08|2|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 |1+8#0000001#e0e0e08|3|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 |1+8#0000001#e0e0e08|4|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 @@ -7,4 +6,5 @@ |1+8#0000001#e0e0e08|6|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 |1+8#0000001#e0e0e08|7|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 |1+8#0000001#e0e0e08|8|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 -|:+0#0000000&|t|a|b|n|e|x|t| |-|3| @15|0|,|0|-|1| @8|A|l@1| +|1+8#0000001#e0e0e08|9|:|t|a|b| @3|~+0#4040ff13#ffffff0| @33 +|2+8#0000001#e0e0e08|0|:|t|a|b| @3|:+0#0000000#ffffff0|t|a|b|n|e|x|t| |-|3| @6|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump index dd930c451d..a8df2d1f19 100644 --- a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump +++ b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@8|||~+0#4040ff13&| @33 | +1#0000000&@8|||~+0#4040ff13&| @33 | +1#0000000&@8|||$+3&&| @13|[|c@2|]| @13|$ -|"+0&&|c@2|"| |[|N|e|w|]| @33 +| +1&&@8|||"+0&&|c@2|"| |[|N|e|w|]| @23 diff --git a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump index 21bb63b845..7285afbeeb 100644 --- a/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump +++ b/src/testdir/dumps/Test_tabpanel_noeval_tabpanel_statusline_tabline_1.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @33||+1#0000000&| @8 |~+0#4040ff13&| @33||+1#0000000&| @8 |$+3&&| @13|[|c@2|]| @13|$||+1&&| @8 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|+|=|a|l|i|g|n|:|r|i|g|h|t| @15 +| +0&&@34||+1&&| @8 diff --git a/src/testdir/dumps/Test_tabpanel_only_0.dump b/src/testdir/dumps/Test_tabpanel_only_0.dump index b0e0bbe890..49367a67cc 100644 --- a/src/testdir/dumps/Test_tabpanel_only_0.dump +++ b/src/testdir/dumps/Test_tabpanel_only_0.dump @@ -7,4 +7,4 @@ | +1&&@19|a+0&&|s|d|f| @24||+1&&|a+0&&|s|d|f| @23 | +1&&@19|a+0&&|s|d>f| @24||+1&&|a+0&&|s|d|f| @23 | +1&&@19|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @1|1|0|1|,|4| @5|B|o|t| |<+1&&|N|o| |N|a|m|e|]| |[|+|]| |1|0|1|,|4| @5|B|o|t -| +0&&@77 +| @19| +0&&@57 diff --git a/src/testdir/dumps/Test_tabpanel_only_1.dump b/src/testdir/dumps/Test_tabpanel_only_1.dump index 8cbd93b6c1..b3d9427378 100644 --- a/src/testdir/dumps/Test_tabpanel_only_1.dump +++ b/src/testdir/dumps/Test_tabpanel_only_1.dump @@ -7,4 +7,4 @@ |a|s|d|f| @34||+1&&|a+0&&|s|d|f| @33 |a|s|d>f| @34||+1&&|a+0&&|s|d|f| @33 |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @7|1|0|1|,|4| @9|B|o|t| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @6|1|0|1|,|4| @9|B|o|t -|:+0&&|t|a|b|o|n|l|y| @69 +| +0&&@77 diff --git a/src/testdir/dumps/Test_tabpanel_quitall_0.dump b/src/testdir/dumps/Test_tabpanel_quitall_0.dump index 7399ca1a79..debe26716c 100644 --- a/src/testdir/dumps/Test_tabpanel_quitall_0.dump +++ b/src/testdir/dumps/Test_tabpanel_quitall_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|<+3&&|o| |N|a|m|e|]| |[|+|]| |1|,|1| @5|A|l@1 -| +0&&@44 +| +1&&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_ruler_0.dump b/src/testdir/dumps/Test_tabpanel_ruler_0.dump index d1e2d7594e..bba6816e81 100644 --- a/src/testdir/dumps/Test_tabpanel_ruler_0.dump +++ b/src/testdir/dumps/Test_tabpanel_ruler_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +| +1#0000000&@19| +0&&@12|0|,|0|-|1| @2|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump index 4fe5c9327f..e57ecb053b 100644 --- a/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump +++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_0_2.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16 | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16 | +1#0000000&@19|b+3&&@2| @17|a+1&&@2| @15|[|N|o| |N|a|m|e|]| |[|+|]| @4 -| +0&&@77 +@20| +0&&@57 diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump index ac616493b9..f57c866327 100644 --- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump +++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_1.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @56 | +1#0000000&@19|~+0#4040ff13&| @56 | +1#0000000&@19|~+0#4040ff13&| @56 -| +0#0000000&@77 +| +1#0000000&@19| +0&&@57 diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump index 619903666d..bead88d768 100644 --- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump +++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_2.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26 | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26 | +1#0000000&@19|[+3&&|N|o| |N|a|m|e|]| @20|[+1&&|N|o| |N|a|m|e|]| @18 -| +0&&@77 +@20| +0&&@57 diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump index 6311208a2b..072ff9d3d9 100644 --- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump +++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_3.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @56| +1#0000000&@19 |~+0#4040ff13&| @56| +1#0000000&@19 |~+0#4040ff13&| @56| +1#0000000&@19 -| +0&&@77 +| +0&&@57| +1&&@19 diff --git a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump index 3c882693c8..6900d6d1e9 100644 --- a/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump +++ b/src/testdir/dumps/Test_tabpanel_stpl_eq_1_4.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26| +1#0000000&@19 |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26| +1#0000000&@19 |[+3&&|N|o| |N|a|m|e|]| @20|[+1&&|N|o| |N|a|m|e|]| @38 -| +0&&@77 +| +0&&@57| +1&&@19 diff --git a/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump b/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump index 14400e598f..beabbcc1d0 100644 --- a/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump +++ b/src/testdir/dumps/Test_tabpanel_tabline_and_tabpanel_0.dump @@ -6,5 +6,5 @@ | +1#0000000&@8|│|~+0#4040ff13&| @33 | +1#0000000&@8|│|~+0#4040ff13&| @33 | +1#0000000&@8|│|~+0#4040ff13&| @33 -| +1#0000000&@8|│|~+0#4040ff13&| @33 -|"+0#0000000&|c@2|.|t|x|t|"| |[|N|e|w|]| @11|0|,|0|-|1| @8|A|l@1| +| +1#0000000&@8|│|c+3&&@2|.|t|x|t| @10|0|,|0|-|1| @8|A|l@1 +| +1&&@8|│|"+0&&|c@2|.|t|x|t|"| |[|N|e|w|]| @19 diff --git a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump index 284e23ab33..993d990017 100644 --- a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump +++ b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@8|│|~+0#4040ff13&| @33 | +1#0000000&@8|│|~+0#4040ff13&| @33 | +1#0000000&@8|│|~+0#4040ff13&| @33 -| +0#0000000&@26|0|,|0|-|1| @8|A|l@1| +| +1#0000000&@8|│| +0&&@17|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump index d3fec73010..af420ab361 100644 --- a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump +++ b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_1.dump @@ -7,4 +7,4 @@ |│+1#0000000&|~+0#4040ff13&| @42 |│+1#0000000&|~+0#4040ff13&| @42 |│+1#0000000&|~+0#4040ff13&| @42 -|:+0#0000000&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|1|,|0|,|0|-|1| @8|A|l@1| +|│+1#0000000&| +0&&@21|0|,|0|-|1| @12|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump index fc0b17abba..993d990017 100644 --- a/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump +++ b/src/testdir/dumps/Test_tabpanel_vert_is_multibytes_left_2.dump @@ -7,4 +7,4 @@ | +1#0000000&@8|│|~+0#4040ff13&| @33 | +1#0000000&@8|│|~+0#4040ff13&| @33 | +1#0000000&@8|│|~+0#4040ff13&| @33 -|:+0#0000000&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|c|o|l|u|m|n|s|:|1|0@1|,|0|-|1| @8|A|l@1| +| +1#0000000&@8|│| +0&&@17|0|,|0|-|1| @7|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_visual_0.dump b/src/testdir/dumps/Test_tabpanel_visual_0.dump index 14d50afd9a..421a5f31d5 100644 --- a/src/testdir/dumps/Test_tabpanel_visual_0.dump +++ b/src/testdir/dumps/Test_tabpanel_visual_0.dump @@ -6,5 +6,5 @@ | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 -| +1#0000000&@9|~+0#4040ff13&| @33 -|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@4|1@1| @7|1|,|1@1| @9|A|l@1| +| +1#0000000&@9|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|1|,|1@1| @9|A|l@1 +| +1&&@9|-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@11|1@1| @8 diff --git a/src/testdir/dumps/Test_tabpanel_visual_1.dump b/src/testdir/dumps/Test_tabpanel_visual_1.dump index 5d4a66080a..b96c0aca2e 100644 --- a/src/testdir/dumps/Test_tabpanel_visual_1.dump +++ b/src/testdir/dumps/Test_tabpanel_visual_1.dump @@ -6,5 +6,5 @@ | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 -| +1#0000000&@9|~+0#4040ff13&| @33 -|-+2#0000000&@1| |V|I|S|U|A|L| |-@1| +0&&@4|9| @8|2|,|1|4| @9|A|l@1| +| +1#0000000&@9|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|2|,|1|4| @9|A|l@1 +| +1&&@9|-+2&&@1| |V|I|S|U|A|L| |-@1| +0&&@11|9| @9 diff --git a/src/testdir/dumps/Test_tabpanel_visual_2.dump b/src/testdir/dumps/Test_tabpanel_visual_2.dump index c800684279..669881731d 100644 --- a/src/testdir/dumps/Test_tabpanel_visual_2.dump +++ b/src/testdir/dumps/Test_tabpanel_visual_2.dump @@ -6,5 +6,5 @@ | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 | +1#0000000&@9|~+0#4040ff13&| @33 -| +1#0000000&@9|~+0#4040ff13&| @33 -|b+0#0000000&@2|2| |c@2|2| @17|2|,|6| @10|A|l@1| +| +1#0000000&@9|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @4|2|,|6| @10|A|l@1 +| +1&&@9|b+0&&@2|2| |c@2|2| @25 diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump index e665e2536d..135d06dd85 100644 --- a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump +++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000000&@44 +| +1#0000000&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump index 4b61a682d8..5c9926c2a2 100644 --- a/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump +++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_no_pum_1.dump @@ -6,5 +6,5 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -|t+0#0000001#ffff4012|a|b|n|e|w| +3#0000000#ffffff0@1|t|a|b|n|e|x|t| @29 -|:+0&&|t|a|b|n|e|w> @37 +| +1#0000000&@19|t+0#0000001#ffff4012|a|b|n|e|w| +3#0000000#ffffff0@1|t|a|b|n|e|x|t| @9 +| +1&&@19|:+0&&|t|a|b|n|e|w> @17 diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump index e665e2536d..135d06dd85 100644 --- a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump +++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000000&@44 +| +1#0000000&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump index 0e60b9cad8..7682fa829c 100644 --- a/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump +++ b/src/testdir/dumps/Test_tabpanel_with_cmdline_pum_1.dump @@ -3,8 +3,8 @@ |b+2&&@2| @16|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000001#e0e0e08|s|e|t| @11| +1#0000000#ffffff0@3|~+0#4040ff13&| @23 -| +0#0000001#ffd7ff255|s|e|t|f|i|l|e|t|y|p|e| @3| +1#0000000#ffffff0@3|~+0#4040ff13&| @23 -| +0#0000001#ffd7ff255|s|e|t|g|l|o|b|a|l| @5| +1#0000000#ffffff0@3|~+0#4040ff13&| @23 -| +0#0000001#ffd7ff255|s|e|t|l|o|c|a|l| @6| +1#0000000#ffffff0@3|~+0#4040ff13&| @23 -|:+0#0000000&|s|e|t> @40 +| +1#0000000&@19| +0#0000001#e0e0e08|s|e|t| @11| +0#4040ff13#ffffff0@8 +| +1#0000000&@19| +0#0000001#ffd7ff255|s|e|t|f|i|l|e|t|y|p|e| @3| +0#4040ff13#ffffff0@8 +| +1#0000000&@19| +0#0000001#ffd7ff255|s|e|t|g|l|o|b|a|l| @5| +0#4040ff13#ffffff0@8 +| +1#0000000&@19| +0#0000001#ffd7ff255|s|e|t|l|o|c|a|l| @6| +0#4040ff13#ffffff0@8 +| +1#0000000&@19|:+0&&|s|e|t> @20 diff --git a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump index cd65a0a26e..7090936259 100644 --- a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump +++ b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000000&@44 +| +1#0000000&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump index d1da8d23ea..cd5583d15e 100644 --- a/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump +++ b/src/testdir/dumps/Test_tabpanel_with_msg_scrolled_1.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 | +1#0000000&@19|~+0#4040ff13&| @23 -| +0#0000000&@44 +| +1#0000000&@19| +0&&@24 diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump b/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump index 836e07b2a8..7b0daf0b7f 100644 --- a/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump +++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_0.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @56 | +1#0000000&@19|~+0#4040ff13&| @56 | +1#0000000&@19|~+0#4040ff13&| @56 -| +0#0000000&@59|0|,|0|-|1| @8|A|l@1| +| +1#0000000&@19| +0&&@39|0|,|0|-|1| @8|A|l@1| diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump b/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump index 81653d7849..7ea896af71 100644 --- a/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump +++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_1.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26 | +1#0000000&@19|~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26 | +1#0000000&@19|[+3&&|N|o| |N|a|m|e|]| @5|0|,|0|-|1| @5|A|l@1| |[+1&&|N|o| |N|a|m|e|]| @4|0|,|0|-|1| @5|A|l@1 -|:+0&&|v|s|p|l|i|t| @70 +| @19|:+0&&|v|s|p|l|i|t| @50 diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump b/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump index 82d3356441..842ae8a787 100644 --- a/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump +++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_2.dump @@ -7,4 +7,4 @@ | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16 | +1#0000000&@19|~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16 | +1#0000000&@19|<+3&&|N|o| |N|a|m|e|]| |0|,|0|-|1| @1|A|l@1| |<+1&&|o| |N|a|m|e|]| |0|,|0|-|1| |A|l@1| |<|o| |N|a|m|e|]| |0|,|0|-|1| |A|l@1 -|:+0&&|v|s|p|l|i|t| @70 +| @19|:+0&&|v|s|p|l|i|t| @50 diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump b/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump index 6e5f8e4476..62c51f4439 100644 --- a/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump +++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_3.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @56||+1#0000000&| @18 |~+0#4040ff13&| @56||+1#0000000&| @18 |~+0#4040ff13&| @56||+1#0000000&| @18 -|:+0&&|s|e|t| |t|a|b|p|a|n|e|l|o|p|t|=|a|l|i|g|n|:|r|i|g|h|t|,|v|e|r|t| @26|0|,|0|-|1| @8|A|l@1| +| +0&&@39|0|,|0|-|1| @8|A|l@1| ||+1&&| @18 diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump b/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump index 7978943613..131e3f38a7 100644 --- a/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump +++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_4.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26||+1#0000000&| @18 |~+0#4040ff13&| @27||+1#0000000&|~+0#4040ff13&| @26||+1#0000000&| @18 |[+3&&|N|o| |N|a|m|e|]| @5|0|,|0|-|1| @5|A|l@1| |[+1&&|N|o| |N|a|m|e|]| @4|0|,|0|-|1| @5|A|l@1||| @18 -|:+0&&|v|s|p|l|i|t| @70 +|:+0&&|v|s|p|l|i|t| @50||+1&&| @18 diff --git a/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump b/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump index 5744d130ef..bd9183b190 100644 --- a/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump +++ b/src/testdir/dumps/Test_tabpanel_with_vsplit_5.dump @@ -7,4 +7,4 @@ |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&| @18 |~+0#4040ff13&| @18||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&|~+0#4040ff13&| @16||+1#0000000&| @18 |<+3&&|N|o| |N|a|m|e|]| |0|,|0|-|1| @1|A|l@1| |<+1&&|o| |N|a|m|e|]| |0|,|0|-|1| |A|l@1| |<|o| |N|a|m|e|]| |0|,|0|-|1| |A|l@1||| @18 -|:+0&&|v|s|p|l|i|t| @70 +|:+0&&|v|s|p|l|i|t| @50||+1&&| @18 diff --git a/src/testdir/test_tabpanel.vim b/src/testdir/test_tabpanel.vim index 65c7362760..acf0ea94bd 100644 --- a/src/testdir/test_tabpanel.vim +++ b/src/testdir/test_tabpanel.vim @@ -117,6 +117,9 @@ function Test_tabpanel_mouse() call test_setmouse(3, 1) call feedkeys("\", 'xt') call assert_equal(3, tabpagenr()) + call test_setmouse(&lines, 1) + call feedkeys("\", 'xt') + call assert_equal(1, tabpagenr()) " Drag the active tab page tablast @@ -148,8 +151,8 @@ function Test_tabpanel_mouse() call assert_equal(3, tabpagenr()) " Test getmousepos() - call feedkeys("\", 'xt') call test_setmouse(2, 3) + call feedkeys("\", 'xt') let pos = getmousepos() call assert_equal(0, pos['winid']) call assert_equal(0, pos['winrow']) @@ -404,7 +407,7 @@ function Test_tabpanel_visual() let lines =<< trim END set showtabpanel=2 set tabpanelopt=columns:10 - set showtabline=0 + set showtabline=0 laststatus=2 tabnew call setbufline(bufnr(), 1, ['aaa1 bbb1 ccc1 ddd1', 'aaa2 bbb2 ccc2 ddd2', 'aaa3 bbb3 ccc3 ddd3', 'aaa4 bbb4 ccc4 ddd4']) END @@ -452,7 +455,7 @@ function Test_tabpanel_tabline_and_tabpanel() set showtabpanel=2 set tabpanelopt=columns:10,vert set fillchars=tpl_vert:│ - set showtabline=2 + set showtabline=2 laststatus=2 e aaa.txt tabnew e bbb.txt diff --git a/src/version.c b/src/version.c index f69be10d20..adf5f22684 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1898, /**/ 1897, /**/ @@ -4598,7 +4600,7 @@ version_msg_wrap(char_u *s, int wrap) { int len = vim_strsize(s) + (wrap ? 2 : 0); - if (!got_int && len < (int)Columns && msg_col + len >= (int)Columns + if (!got_int && len < cmdline_width && msg_col + len >= cmdline_width && *s != '\n') msg_putchar('\n'); if (!got_int) @@ -4656,7 +4658,7 @@ list_in_columns(char_u **items, int size, int current) } width += 1; - if (Columns < width) + if (cmdline_width < width) { // Not enough screen columns - show one per line for (i = 0; i < item_count; ++i) @@ -4670,7 +4672,7 @@ list_in_columns(char_u **items, int size, int current) // The rightmost column doesn't need a separator. // Sacrifice it to fit in one more column if possible. - ncol = (int) (Columns + 1) / width; + ncol = (cmdline_width + 1) / width; nrow = item_count / ncol + ((item_count % ncol) ? 1 : 0); // "i" counts columns then rows. "idx" counts rows then columns. diff --git a/src/window.c b/src/window.c index 17051c86f9..7ff2282803 100644 --- a/src/window.c +++ b/src/window.c @@ -6228,8 +6228,9 @@ shell_new_columns(void) return; #if defined(FEAT_TABPANEL) - int save_wincol = firstwin->w_wincol; - int save_fr_width = topframe->fr_width; + static int prev_tp_width; + static int prev_wincol; + static int prev_fr_width; #endif int w = COLUMNS_WITHOUT_TPL(); @@ -6242,12 +6243,26 @@ shell_new_columns(void) win_comp_pos(); // recompute w_winrow and w_wincol #if defined(FEAT_TABPANEL) - if (p_ea && firstwin->w_wincol + topframe->fr_width - == save_wincol + save_fr_width && - (firstwin->w_wincol != save_wincol || - topframe->fr_width != save_fr_width)) + int tp_width = tabpanel_width(); + int tp_width_changed = tp_width != prev_tp_width; + // tabpanel width changed + if (tp_width_changed && p_ea) win_equal(curwin, FALSE, 0); + // tabpanel layout changed + if (tp_width_changed + || (tp_width > 0 && (firstwin->w_wincol != prev_wincol + || topframe->fr_width != prev_fr_width))) + { + screen_fill(cmdline_row, (int)Rows, 0, (int)Columns, ' ', ' ', 0); + } + prev_tp_width = tabpanel_width(); + prev_wincol = firstwin->w_wincol; + prev_fr_width = topframe->fr_width; #endif + // Adjust offset for command line start column + cmdline_col_off = firstwin->w_wincol; + cmdline_width = topframe->fr_width; + comp_col(); if (!skip_win_fix_scroll) win_fix_scroll(TRUE); From ef0233691588300ee9cf509447a2e890c4a943ae Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Sat, 8 Nov 2025 17:12:57 +0000 Subject: [PATCH 23/54] patch 9.1.1899: tabpanel: getcmdscreenpos() wrong when tabpanel is shown Problem: tabpanel: getcmdscreenpos() wrong when tabpanel is shown Solution: Adjust f_getcmdscreenpos() and add cmdline_col_off (Hirohito Higashi) related: #18678 closes: #18699 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- src/ex_getln.c | 2 +- src/testdir/test_tabpanel.vim | 39 +++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/ex_getln.c b/src/ex_getln.c index 63e9814546..4ebfbfc5e4 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4481,7 +4481,7 @@ f_getcmdscreenpos(typval_T *argvars UNUSED, typval_T *rettv) { cmdline_info_T *p = get_ccline_ptr(); - rettv->vval.v_number = p != NULL ? p->cmdspos + 1 : 0; + rettv->vval.v_number = p != NULL ? cmdline_col_off + p->cmdspos + 1 : 0; } /* diff --git a/src/testdir/test_tabpanel.vim b/src/testdir/test_tabpanel.vim index acf0ea94bd..4959693260 100644 --- a/src/testdir/test_tabpanel.vim +++ b/src/testdir/test_tabpanel.vim @@ -94,6 +94,45 @@ function Test_tabpanel_with_vsplit() call StopVimInTerminal(buf) endfunc +func Call_cmd_funcs() + let g:results = [getcmdpos(), getcmdscreenpos(), getcmdline()] +endfunc + +function Test_tabpanel_cmdline() + let save_showtabline = &showtabline + let g:results = [] + cnoremap Call_cmd_funcs() + + set showtabline=0 showtabpanel=0 + call Call_cmd_funcs() + call assert_equal([0, 0, ''], g:results) + call feedkeys(":\\", "xt") + call assert_equal([1, 2, ''], g:results) + call feedkeys(":pwd\\", "xt") + call assert_equal([4, 5, 'pwd'], g:results) + + set showtabline=2 showtabpanel=2 tabpanelopt=columns:20,align:left + call Call_cmd_funcs() + call assert_equal([0, 0, ''], g:results) + call feedkeys(":\\", "xt") + call assert_equal([1, 22, ''], g:results) + call feedkeys(":pwd\\", "xt") + call assert_equal([4, 25, 'pwd'], g:results) + + set showtabline=2 showtabpanel=2 tabpanelopt+=align:right + call Call_cmd_funcs() + call assert_equal([0, 0, ''], g:results) + call feedkeys(":\\", "xt") + call assert_equal([1, 2, ''], g:results) + call feedkeys(":pwd\\", "xt") + call assert_equal([4, 5, 'pwd'], g:results) + + unlet g:results + cunmap + call s:reset() + let &showtabline = save_showtabline +endfunc + function Test_tabpanel_mouse() let save_showtabline = &showtabline let save_mouse = &mouse diff --git a/src/version.c b/src/version.c index adf5f22684..a95d332c38 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1899, /**/ 1898, /**/ From c28b73d34990e574ebd7542fe0adb789fc0bd674 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 8 Nov 2025 17:16:41 +0000 Subject: [PATCH 24/54] runtime(doc): Improve :help synconcealed() description closes: #18698 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/builtin.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index e231dedb16..b37a25bf1f 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,4 +1,4 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -11578,7 +11578,7 @@ synIDtrans({synID}) *synIDtrans()* synconcealed({lnum}, {col}) *synconcealed()* - The result is a |List| with currently three items: + The result is a |List| with three items: 1. The first item in the list is 0 if the character at the position {lnum} and {col} is not part of a concealable region, 1 if it is. {lnum} is used like with |getline()|. From a3063f2f905e71d763fbff775fa7a84e3a478a11 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 8 Nov 2025 17:18:16 +0000 Subject: [PATCH 25/54] runtime(doc): Wrap some overlength lines in the user manual closes: #18696 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/usr_02.txt | 6 +++--- runtime/doc/usr_09.txt | 6 +++--- runtime/doc/usr_10.txt | 13 +++++++------ runtime/doc/usr_22.txt | 10 +++++----- runtime/doc/usr_24.txt | 6 +++--- runtime/doc/usr_30.txt | 8 ++++---- runtime/doc/usr_40.txt | 12 ++++++------ runtime/doc/usr_41.txt | 11 +++++++---- runtime/doc/usr_44.txt | 10 +++++----- 9 files changed, 43 insertions(+), 39 deletions(-) diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index 6bb860fbed..2b06376a64 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_02.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -522,8 +522,8 @@ Summary: *help-summary* > < You can see the user guide topics |03.9| and |usr_27.txt| in the introduction. -3) Options are enclosed in single apostrophes. To go to the help topic for the - list option: > +3) Options are enclosed in single apostrophes. To go to the help topic for + the list option: > :help 'list' < If you only know you are looking for a certain option, you can also do: > :help options.txt diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt index 666dbd4e98..a6b2f16b27 100644 --- a/runtime/doc/usr_09.txt +++ b/runtime/doc/usr_09.txt @@ -1,4 +1,4 @@ -*usr_09.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_09.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -132,8 +132,8 @@ select text in a standard manner. The X Window system also has a standard system for using the mouse. Unfortunately, these two standards are not the same. Fortunately, you can customize Vim. You can make the behavior of the mouse -work like an X Window system mouse or a Microsoft Windows mouse. The following -command makes the mouse behave like an X Window mouse: > +work like an X Window system mouse or a Microsoft Windows mouse. The +following command makes the mouse behave like an X Window mouse: > :behave xterm diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt index ebf4bab40f..6d3e89b791 100644 --- a/runtime/doc/usr_10.txt +++ b/runtime/doc/usr_10.txt @@ -1,4 +1,4 @@ -*usr_10.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_10.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -296,8 +296,8 @@ five lines before the last line in the file. USING MARKS -Instead of figuring out the line numbers of certain positions, remembering them -and typing them in a range, you can use marks. +Instead of figuring out the line numbers of certain positions, remembering +them and typing them in a range, you can use marks. Place the marks as mentioned in chapter 3. For example, use "mt" to mark the top of an area and "mb" to mark the bottom. Then you can use this range to specify the lines between the marks (including the lines with the marks): > @@ -736,9 +736,10 @@ of the program replaces these lines. line 44 line 55 last line last line -The "!!" command filters the current line through a filter. In Unix the "date" -command prints the current time and date. "!!date" replaces the current -line with the output of "date". This is useful to add a timestamp to a file. +The "!!" command filters the current line through a filter. In Unix the +"date" command prints the current time and date. "!!date" replaces the +current line with the output of "date". This is useful to add a timestamp to +a file. Note: There is a difference between "!cmd" (e.g. using it without any file range) and "{range}!cmd". While the former will simply execute the external diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index d03cb53fe2..8bdabe7208 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -1,4 +1,4 @@ -*usr_22.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_22.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -30,15 +30,15 @@ Vim has a plugin that makes it possible to edit a directory. Try this: > Through the magic of autocommands and Vim scripts, the window will be filled with the contents of the directory. It looks like this (slightly cleaned up -so that it fits within 80 chars): > +so that it fits within 78 chars): > - " =========================================================================== - " Netrw Directory Listing (netrw v180) + " ========================================================================== + " Netrw Directory Listing (netrw v180) " /path/to/vim/runtime/doc " Sorted by name " Sort sequence: [\/]$,*,\(\.bak\|\~\|\.o\|\.h\|\.info\|\.swp\)[*@]\=$ " Quick Help: :help -:go up dir D:delete R:rename s:sort-by x:special - " =========================================================================== + " ========================================================================== ../ ./ check/ diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt index 16a7063531..04cdc81cdc 100644 --- a/runtime/doc/usr_24.txt +++ b/runtime/doc/usr_24.txt @@ -1,4 +1,4 @@ -*usr_24.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_24.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -567,8 +567,8 @@ that combination. Thus CTRL-K dP also works. Since there is no digraph for Note: The digraphs depend on the character set that Vim assumes you are - using. Always use ":digraphs" to find out which digraphs are currently - available. + using. Always use ":digraphs" to find out which digraphs are + currently available. You can define your own digraphs by specifying the target character with a decimal number. Example: > diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index 8a3873c867..c6c1b443d6 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -1,4 +1,4 @@ -*usr_30.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_30.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -37,9 +37,9 @@ you give) and captures the results: > If errors were generated, they are captured and the editor positions you where the first error occurred. - Take a look at an example ":make" session. (Typical :make sessions generate -far more errors and fewer stupid ones.) After typing ":make" the screen looks -like this: + Take a look at an example ":make" session. (Typical :make sessions +generate far more errors and fewer stupid ones.) After typing ":make" the +screen looks like this: :!make | &tee /tmp/vim215953.err ~ gcc -g -Wall -o prog main.c sub.c ~ diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index 6517f851e8..86a5c69e22 100644 --- a/runtime/doc/usr_40.txt +++ b/runtime/doc/usr_40.txt @@ -1,4 +1,4 @@ -*usr_40.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_40.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -385,8 +385,8 @@ Some of the other options and keywords are as follows: -count={number} The command can take a count whose default is {number}. The resulting count can be used through the keyword. - -bang You can use a !. If present, using will - result in a !. + -bang You can use a !. If present, using + will result in a !. -register You can specify a register. (The default is the unnamed register.) The register specification is available as @@ -563,9 +563,9 @@ for the cprograms group: > GROUPS -The {group} item, used when defining an autocommand, groups related autocommands -together. This can be used to delete all the autocommands in a certain group, -for example. +The {group} item, used when defining an autocommand, groups related +autocommands together. This can be used to delete all the autocommands in a +certain group, for example. When defining several autocommands for a certain group, use the ":augroup" command. For example, let's define autocommands for C programs: > diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 1ac9b14cca..b642909359 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_41.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -764,7 +764,8 @@ String manipulation: *string-functions* charclass() class of a character match() position where a pattern matches in a string matchbufline() all the matches of a pattern in a buffer - matchend() position where a pattern match ends in a string + matchend() position where a pattern match ends in a + string matchfuzzy() fuzzy matches a string in a list of strings matchfuzzypos() fuzzy matches a string in a list of strings matchstr() match of a pattern in a string @@ -841,7 +842,8 @@ List manipulation: *list-functions* indexof() index in a List where an expression is true max() maximum value in a List min() minimum value in a List - count() count number of times a value appears in a List + count() count number of times a value appears in a + List repeat() repeat a List multiple times flatten() flatten a List flattennew() flatten a copy of a List @@ -1246,7 +1248,8 @@ Mappings and Menus: *mapping-functions* Testing: *test-functions* assert_equal() assert that two expressions values are equal assert_equalfile() assert that two file contents are equal - assert_notequal() assert that two expressions values are not equal + assert_notequal() assert that two expressions values are not + equal assert_inrange() assert that an expression is inside a range assert_match() assert that a pattern matches the value assert_notmatch() assert that a pattern does not match the value diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index 12a32e507a..4de0861322 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -1,4 +1,4 @@ -*usr_44.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_44.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -629,10 +629,10 @@ be included in the next Vim version! ADDING TO AN EXISTING SYNTAX FILE -We were assuming you were adding a completely new syntax file. When an existing -syntax file works, but is missing some items, you can add items in a separate -file. That avoids changing the distributed syntax file, which will be lost -when installing a new version of Vim. +We were assuming you were adding a completely new syntax file. When an +existing syntax file works, but is missing some items, you can add items in a +separate file. That avoids changing the distributed syntax file, which will +be lost when installing a new version of Vim. Write syntax commands in your file, possibly using group names from the existing syntax. For example, to add new variable types to the C syntax file: > From 185cec2b0983dfe0b94ea7b24e390dc00c65686d Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 8 Nov 2025 17:19:34 +0000 Subject: [PATCH 26/54] runtime(doc): Rewrite some overlength lines closes: #18695 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/index.txt | 4 ++-- runtime/doc/map.txt | 7 +++---- runtime/doc/usr_05.txt | 9 +++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 0581a83699..a46f46c699 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 9.1. Last change: 2025 Oct 31 +*index.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -169,7 +169,7 @@ commands in CTRL-X submode *i_CTRL-X_index* |i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down |i_CTRL-X_CTRL-U| CTRL-X CTRL-U complete with 'completefunc' |i_CTRL-X_CTRL-V| CTRL-X CTRL-V complete like in : command line -|i_CTRL-X_CTRL-Z| CTRL-X CTRL-Z stop completion, keeping the text as-is +|i_CTRL-X_CTRL-Z| CTRL-X CTRL-Z stop completion, text is unchanged |i_CTRL-X_CTRL-]| CTRL-X CTRL-] complete tags |i_CTRL-X_s| CTRL-X s spelling suggestions diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 98ac3e1181..ac8f177f29 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*map.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1753,7 +1753,7 @@ by default correspond to the current line, last line and the whole buffer, relate to arguments, (loaded) buffers, windows or tab pages. Possible values are (second column is the short name used in listing): - -addr=lines Range of lines (this is the default for -range) + -addr=lines Range of lines (the default for -range) -addr=arguments arg Range for arguments -addr=buffers buf Range for buffers (also not loaded buffers) -addr=loaded_buffers load Range for loaded buffers @@ -1761,8 +1761,7 @@ Possible values are (second column is the short name used in listing): -addr=tabs tab Range for tab pages -addr=quickfix qf Range for quickfix entries -addr=other ? Other kind of range; can use ".", "$" and "%" - as with "lines" (this is the default for - -count) + as with "lines" (the default for -count) Special cases ~ diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 1be470e132..427b597c3f 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_05.txt* For Vim version 9.1. Last change: 2025 Nov 07 VIM USER MANUAL by Bram Moolenaar @@ -338,8 +338,8 @@ This only works in a Vim script file, not when typing commands at the command line. > - command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis - \ | wincmd p | diffthis + command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ + \ | diffthis | wincmd p | diffthis This adds the ":DiffOrig" command. Use this in a modified buffer to see the differences with the file it was loaded from. See |diff| and |:DiffOrig|. @@ -539,7 +539,8 @@ when you use Vim. There are only two steps for adding a global plugin: GETTING A GLOBAL PLUGIN Where can you find plugins? -- Some are always loaded, you can see them in the directory $VIMRUNTIME/plugin. +- Some are always loaded, you can see them in the directory + $VIMRUNTIME/plugin. - Some come with Vim. You can find them in the directory $VIMRUNTIME/macros and its sub-directories and under $VIM/vimfiles/pack/dist/opt/. - Download from the net. There is a large collection on http://www.vim.org. From 47c30bb03a765c9a89c0a9a8eadc414611866df6 Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Sat, 8 Nov 2025 17:20:55 +0000 Subject: [PATCH 27/54] patch 9.1.1900: tabpanel: wrong condition after v9.1.1898 Problem: tabpanel: wrong condition after v9.1.1898 Solution: Update condition (Hirohito Higashi) related: #18678 closes: #18692 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- src/screen.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index bbb4bbaaf4..123276b5d0 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2328,7 +2328,7 @@ screen_fill( { redraw_cmdline = TRUE; if (((start_col == 0 && end_col == Columns) - || (start_col <= cmdline_col_off + || (start_col == cmdline_col_off && end_col == cmdline_col_off + cmdline_width)) && c1 == ' ' && c2 == ' ' && attr == 0 #ifdef FEAT_PROP_POPUP diff --git a/src/version.c b/src/version.c index a95d332c38..78fb7bea17 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1900, /**/ 1899, /**/ From 59f0ea5b3eb444748c83340f1dcebb182db28b40 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 8 Nov 2025 17:23:47 +0000 Subject: [PATCH 28/54] runtime(vim): Update base syntax, match Vim9 object type constructor fixes: #18677. closes: #18691 Reported by Aliaksei Budavei. Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/syntax/generator/vim.vim.base | 24 +++++++++++--- .../syntax/testdir/dumps/vim9_types_00.dump | 4 +-- .../dumps/vim9_types_example_object_00.dump | 20 ++++++++++++ .../dumps/vim9_types_example_object_01.dump | 20 ++++++++++++ .../testdir/dumps/vim9_types_object_00.dump | 20 ++++++++++++ .../testdir/dumps/vim9_types_object_01.dump | 20 ++++++++++++ runtime/syntax/testdir/input/vim9_types.vim | 2 +- .../input/vim9_types_example_object.vim | 31 +++++++++++++++++++ .../testdir/input/vim9_types_object.vim | 27 ++++++++++++++++ runtime/syntax/vim.vim | 24 +++++++++++--- 10 files changed, 181 insertions(+), 11 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/vim9_types_example_object_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_types_object_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim9_types_object_01.dump create mode 100644 runtime/syntax/testdir/input/vim9_types_example_object.vim create mode 100644 runtime/syntax/testdir/input/vim9_types_object.vim diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 0f7d3ff89d..3be56651e6 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 04 +" Last Change: 2025 Nov 07 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -575,13 +575,20 @@ syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType conta syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType syn keyword vimType contained blob bool channel float job number string void syn keyword vimTypeAny contained any +syn region vimTypeObject contained + \ matchgroup=vimType + \ start="\" syn region vimCompoundType contained matchgroup=vimType start="\" -syn cluster vimType contains=vimType,vimTypeAny,vimCompoundType,vimUserType +syn cluster vimType contains=vimType,vimTypeAny,vimTypeObject,vimCompoundType,vimUserType " Classes, Enums And Interfaces: {{{2 " ============================= @@ -1130,6 +1137,13 @@ syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@ syn match vim9VariableTypeSep contained "\S\@1<=:\%(\s\|\n\)\@=" skipwhite nextgroup=@vim9VariableType syn keyword vim9VariableType contained blob bool channel float job number string void skipwhite nextgroup=vimLetHeredoc syn keyword vim9VariableTypeAny contained any skipwhite nextgroup=vimLetHeredoc +syn region vim9VariableTypeObject contained + \ matchgroup=vimType + \ start="\" skipwhite nextgroup=vimLetHeredoc syn region vim9VariableCompoundType contained \ matchgroup=vim9VariableType @@ -1155,7 +1169,7 @@ syn region vim9VariableCompoundType contained \ transparent syn match vim9VariableUserType contained "\<\%(\h\w*\.\)*\u\w*\>" skipwhite nextgroup=vimLetHeredoc -syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableCompoundType,vim9VariableUserType +syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableTypeObject,vim9VariableCompoundType,vim9VariableUserType " Lockvar and Unlockvar: {{{2 " ===================== @@ -2586,6 +2600,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimTodo Todo hi def link vimType Type hi def link vimTypeAny vimType + hi def link vimTypeObject vimType hi def link vimUniq vimCommand hi def link vimUniqBang vimBang hi def link vimUniqOptions Special @@ -2677,7 +2692,8 @@ if !exists("skip_vim_syntax_inits") hi def link vim9TypeEquals vimOper hi def link vim9Variable vimVar hi def link vim9VariableType vimType - hi def link vim9VariableTypeAny vimType + hi def link vim9VariableTypeAny vimTypeAny + hi def link vim9VariableTypeObject vimTypeObject hi def link vim9Var vimCommand hi def link vim9Vim9ScriptArg Special hi def link vim9Vim9Script vimCommand diff --git a/runtime/syntax/testdir/dumps/vim9_types_00.dump b/runtime/syntax/testdir/dumps/vim9_types_00.dump index 9513a41943..515da0f089 100644 --- a/runtime/syntax/testdir/dumps/vim9_types_00.dump +++ b/runtime/syntax/testdir/dumps/vim9_types_00.dump @@ -1,13 +1,13 @@ >v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 |#+0#0000e05&| |V|i|m|9| |t|y|p|e|s| +0#0000000&@62 |#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|T|y|p|e|A|n|y| |T|o|d|o| +0#0000000&@34 -|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|V|a|r|i|a|b|l|e|T|y|p|e|A|n|y| |T|o|d|o| +0#0000000&@26 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|9|V|a|r|i|a|b|l|e|T|y|p|e|A|n|y| |T|o|d|o| +0#0000000&@25 @75 @75 |#+0#0000e05&| |b|u|i|l|t|i|n| |t|y|p|e|s| |(|d|i|s|t|i|n|c|t| |a|n|y| |h|i|g|h|l|i|g|h|t|i|n|g|)| +0#0000000&@31 @75 |v+0#af5f00255&|a|r| +0#0000000&|f|o@1|:| |b+0#00e0003&|o@1|l| +0#0000000&@61 -|v+0#af5f00255&|a|r| +0#0000000&|b|a|r|:| |a+0#00e0003&|n|y| +0#0000000&@62 +|v+0#af5f00255&|a|r| +0#0000000&|b|a|r|:| |a+0#0000001#ffff4012|n|y| +0#0000000#ffffff0@62 @75 |d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&|a+0#0000000&|r|g|:| |b+0#00e0003&|o@1|l|)+0#e000e06&|:+0#0000000&| |b+0#00e0003&|o@1|l| +0#0000000&@50 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 diff --git a/runtime/syntax/testdir/dumps/vim9_types_example_object_00.dump b/runtime/syntax/testdir/dumps/vim9_types_example_object_00.dump new file mode 100644 index 0000000000..98aaaee0fb --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_types_example_object_00.dump @@ -0,0 +1,20 @@ +>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 +|#+0#0000e05&| |V|i|m|9| |o|b|j|e|c|t| |t|y|p|e| |c|o|n|s|t|r|u|c|t|o|r| +0#0000000&@44 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|T|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@31 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|9|V|a|r|i|a|b|l|e|T|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@22 +@75 +@75 +|#+0#0000e05&| |I|s@1|u|e| |#|1|8|6|7@1| |(|N|o| |r|e|c|o|g|n|i|t|i|o|n| |o|f| |o|b|j|e|c|t|<|a|n|y|>| |t|y|p|e|s| |-| |A|l|i|a|k|s|e|i| |B|u|d|a|v|e|i|)| +0#0000000&@3 +|| @73 +|i+0#af5f00255&|n|t|e|r|f|a|c|e| +0#0000000&|I| @63 +@2|d+0#af5f00255&|e|f| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@52 +|e+0#af5f00255&|n|d|i|n|t|e|r|f|a|c|e| +0#0000000&@62 +@75 +|c+0#af5f00255&|l|a|s@1| +0#0000000&|C| |i+0#af5f00255&|m|p|l|e|m|e|n|t|s| +0#0000000&|I| @54 +@2|d+0#af5f00255&|e|f| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@52 +@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|C|"| +0#0000000&@60 +@2|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@66 +|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66 +@75 +|e+0#af5f00255&|n|u|m| +0#0000000&|E| |i+0#af5f00255&|m|p|l|e|m|e|n|t|s| +0#0000000&|I| @55 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump b/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump new file mode 100644 index 0000000000..4f2100214d --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@1|d+0#af5f00255&|e|f| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@52 +@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|C|"| +0#0000000&@60 +@2|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@66 +|e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66 +@75 +>e+0#af5f00255&|n|u|m| +0#0000000&|E| |i+0#af5f00255&|m|p|l|e|m|e|n|t|s| +0#0000000&|I| @55 +@2|I|N|S|T|A|N|C|E| @64 +@75 +@2|d+0#af5f00255&|e|f| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@52 +@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|E|"| +0#0000000&@60 +@2|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@66 +|e+0#af5f00255&|n|d|e|n|u|m| +0#0000000&@67 +@75 +|v+0#af5f00255&|a|r| +0#0000000&|c|:| |o+0#00e0003&|b|j|e|c|t|<|C+0#0000000&|>+0#00e0003&| +0#0000000&|=+0#af5f00255&| +0#0000000&|C|.|n+0#00e0e07&|e|w|(+0#e000e06&|)| +0#0000000&@48 +|v+0#af5f00255&|a|r| +0#0000000&|e|:| |o+0#00e0003&|b|j|e|c|t|<|E+0#0000000&|>+0#00e0003&| +0#0000000&|=+0#af5f00255&| +0#0000000&|E|.+0#af5f00255&|I+0#0000000&|N|S|T|A|N|C|E| @45 +|v+0#af5f00255&|a|r| +0#0000000&|o|s|:| |t+0#00e0003&|u|p|l|e|<|o|b|j|e|c|t|<|a|n|y|>|,+0#0000000&| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|(+0#e000e06&|c+0#0000000&|,| |e|)+0#e000e06&| +0#0000000&@28 +|e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|c+0#0000000&|,| |e|)+0#e000e06&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|o|s| @57 +@75 +|~+0#4040ff13&| @73 +| +0#0000000&@56|1|9|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim9_types_object_00.dump b/runtime/syntax/testdir/dumps/vim9_types_object_00.dump new file mode 100644 index 0000000000..ea653037e4 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_types_object_00.dump @@ -0,0 +1,20 @@ +>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 +|#+0#0000e05&| |V|i|m|9| |o|b|j|e|c|t| |t|y|p|e| |c|o|n|s|t|r|u|c|t|o|r| +0#0000000&@44 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|I|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@31 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|9|V|a|r|i|a|b|l|e|I|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@22 +@75 +@75 +|i+0#af5f00255&|n|t|e|r|f|a|c|e| +0#0000000&|I| @63 +|e+0#af5f00255&|n|d|i|n|t|e|r|f|a|c|e| +0#0000000&@62 +@75 +|v+0#af5f00255&|a|r| +0#0000000&|a|:| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&| +0#0000000&@58 +|v+0#af5f00255&|a|r| +0#0000000&|b|:| |o+0#00e0003&|b|j|e|c|t|<|a|n|y|>| +0#0000000&@56 +|v+0#af5f00255&|a|r| +0#0000000&|c|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1| +0#0000000&@50 +|v+0#af5f00255&|a|r| +0#0000000&|d|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|a|n|y|>@1| +0#0000000&@48 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66 +@4|a|r|g|1|:| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&|,+0#0000000&| @54 +@4|a|r|g|2|:| |o+0#00e0003&|b|j|e|c|t|<|a|n|y|>|,+0#0000000&| @52 +@4|a|r|g|3|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1|,+0#0000000&| @46 +@4|a|r|g|4|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|a|n|y|>@1|)+0#e000e06&| +0#0000000&@44 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim9_types_object_01.dump b/runtime/syntax/testdir/dumps/vim9_types_object_01.dump new file mode 100644 index 0000000000..d4031aa10d --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim9_types_object_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +|d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66 +@4|a|r|g|1|:| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&|,+0#0000000&| @54 +@4|a|r|g|2|:| |o+0#00e0003&|b|j|e|c|t|<|a|n|y|>|,+0#0000000&| @52 +@4|a|r|g|3|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1|,+0#0000000&| @46 +@4>a|r|g|4|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|a|n|y|>@1|)+0#e000e06&| +0#0000000&@44 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|B|a|r|(+0#e000e06&|)|:+0#0000000&| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&| +0#0000000&@54 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|B|a|z|(+0#e000e06&|)|:+0#0000000&| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1| +0#0000000&@46 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|9|,|5| @9|B|o|t| diff --git a/runtime/syntax/testdir/input/vim9_types.vim b/runtime/syntax/testdir/input/vim9_types.vim index 81e76efd46..97a3636fcb 100644 --- a/runtime/syntax/testdir/input/vim9_types.vim +++ b/runtime/syntax/testdir/input/vim9_types.vim @@ -1,7 +1,7 @@ vim9script # Vim9 types # VIM_TEST_SETUP hi link vimTypeAny Todo -# VIM_TEST_SETUP hi link vimVariableTypeAny Todo +# VIM_TEST_SETUP hi link vim9VariableTypeAny Todo # builtin types (distinct any highlighting) diff --git a/runtime/syntax/testdir/input/vim9_types_example_object.vim b/runtime/syntax/testdir/input/vim9_types_example_object.vim new file mode 100644 index 0000000000..4d36cc9259 --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_types_example_object.vim @@ -0,0 +1,31 @@ +vim9script +# Vim9 object type constructor +# VIM_TEST_SETUP hi link vimTypeObject Todo +# VIM_TEST_SETUP hi link vim9VariableTypeObject Todo + + +# Issue #18677 (No recognition of object types - Aliaksei Budavei) + +interface I + def string(): string +endinterface + +class C implements I + def string(): string + return "C" + enddef +endclass + +enum E implements I + INSTANCE + + def string(): string + return "E" + enddef +endenum + +var c: object = C.new() +var e: object = E.INSTANCE +var os: tuple, object> = (c, e) +echo (c, e) == os + diff --git a/runtime/syntax/testdir/input/vim9_types_object.vim b/runtime/syntax/testdir/input/vim9_types_object.vim new file mode 100644 index 0000000000..7066464559 --- /dev/null +++ b/runtime/syntax/testdir/input/vim9_types_object.vim @@ -0,0 +1,27 @@ +vim9script +# Vim9 object type constructor +# VIM_TEST_SETUP hi link vimIypeObject Todo +# VIM_TEST_SETUP hi link vim9VariableIypeObject Todo + + +interface I +endinterface + +var a: object +var b: object +var c: object> +var d: object> + +def Foo( + arg1: object, + arg2: object, + arg3: object>, + arg4: object>) +enddef + +def Bar(): object +enddef + +def Baz(): object> +enddef + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 69ca7d1530..b9e05ddad6 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 04 +" Last Change: 2025 Nov 07 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -629,13 +629,20 @@ syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType conta syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType syn keyword vimType contained blob bool channel float job number string void syn keyword vimTypeAny contained any +syn region vimTypeObject contained + \ matchgroup=vimType + \ start="\" syn region vimCompoundType contained matchgroup=vimType start="\" -syn cluster vimType contains=vimType,vimTypeAny,vimCompoundType,vimUserType +syn cluster vimType contains=vimType,vimTypeAny,vimTypeObject,vimCompoundType,vimUserType " Classes, Enums And Interfaces: {{{2 " ============================= @@ -1186,6 +1193,13 @@ syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@ syn match vim9VariableTypeSep contained "\S\@1<=:\%(\s\|\n\)\@=" skipwhite nextgroup=@vim9VariableType syn keyword vim9VariableType contained blob bool channel float job number string void skipwhite nextgroup=vimLetHeredoc syn keyword vim9VariableTypeAny contained any skipwhite nextgroup=vimLetHeredoc +syn region vim9VariableTypeObject contained + \ matchgroup=vimType + \ start="\" skipwhite nextgroup=vimLetHeredoc syn region vim9VariableCompoundType contained \ matchgroup=vim9VariableType @@ -1211,7 +1225,7 @@ syn region vim9VariableCompoundType contained \ transparent syn match vim9VariableUserType contained "\<\%(\h\w*\.\)*\u\w*\>" skipwhite nextgroup=vimLetHeredoc -syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableCompoundType,vim9VariableUserType +syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableTypeObject,vim9VariableCompoundType,vim9VariableUserType " Lockvar and Unlockvar: {{{2 " ===================== @@ -2648,6 +2662,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimTodo Todo hi def link vimType Type hi def link vimTypeAny vimType + hi def link vimTypeObject vimType hi def link vimUniq vimCommand hi def link vimUniqBang vimBang hi def link vimUniqOptions Special @@ -2739,7 +2754,8 @@ if !exists("skip_vim_syntax_inits") hi def link vim9TypeEquals vimOper hi def link vim9Variable vimVar hi def link vim9VariableType vimType - hi def link vim9VariableTypeAny vimType + hi def link vim9VariableTypeAny vimTypeAny + hi def link vim9VariableTypeObject vimTypeObject hi def link vim9Var vimCommand hi def link vim9Vim9ScriptArg Special hi def link vim9Vim9Script vimCommand From a795aab885e140938c8c6ae08297df6b2ce24be1 Mon Sep 17 00:00:00 2001 From: Jesse Portnoy Date: Sun, 9 Nov 2025 18:57:34 +0000 Subject: [PATCH 29/54] runtime(spec): Add support for more tags and distributions - specMacroIdentifier: support macros starting with '?'; the most common example is `%{?dist}` - specPreAmble: added some missing tags from: https://rpm.org/docs/4.19.x/manual/spec.html - Added support for: `fedora`, `rhel`, `rocky`, `rhl`, `centos`, `el\d` and `fc\d`, see https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag closes: #18703 Signed-off-by: Jesse Portnoy Signed-off-by: Christian Brabandt --- runtime/syntax/spec.vim | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index 944bdcaa37..bbd6d395ba 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -6,6 +6,7 @@ " Last Change: 2020 May 25 " 2024 Sep 10 by Vim Project: add file triggers support, #15569 " 2025 May 05 by Vim Project: update for rpm 4.2 #17258 +" 2025 Nov 09 by Vim Project: support for more distributions and tags #18703 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -22,7 +23,7 @@ syn match specVariables contained '\$\h\w*' contains=specSpecialVariablesNames syn match specVariables contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent -syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar +syn match specMacroIdentifier contained '%{?\?\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar syn match specSpecialVariables contained '\$[0-9]\|\${[0-9]}' syn match specCommandOpts contained '\s\(-\w\+\|--\w[a-zA-Z_-]\+\)'ms=s+1 @@ -60,17 +61,17 @@ syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specL "specCommands syn match specConfigure contained '\./configure' -syn match specTarCommand contained '\' +syn keyword specMacroNameOther contained buildroot buildsubdir distribution disturl ix86 name nil optflags perl_sitearch release requires_eq vendor version dist fedora rhel rocky rhl centos +syn match specMacroNameOther contained '\<\(PATCH\|SOURCE\|el\|fc\)\d*\>' "valid _macro names from /usr/lib/rpm/macros syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _build_alias _build_cpu _build_os _build_vendor _builddir _buildshell _buildsubdir _bzip2bin _datadir _dbpath _dbpath_rebuild _defaultdocdir _defaultlicensedir _docdir _excludedocs _exec_prefix _fixgroup _fixowner _fixperms _ftpport _ftpproxy _gpg_path _group_path _gzipbin _host _host_alias _host_cpu _host_os _host_vendor _httpport _httpproxy _iconsdir _includedir _infodir _install_langs _install_script_path _instchangelog _keyring _keyringpath _langpatt _lib _libdir _libexecdir _localstatedir _mandir _netsharedpath _oldincludedir _os _passwd_path _pgp_path _pgpbin _preScriptEnvironment _prefix _provides _rpmconfigdir _rpmdir _rpmfilename _rpmformat _rpmluadir _rpmmacrodir _sbindir _sharedstatedir _signature _source_payload _sourcedir _specdir _srcrpmdir _sysconfdir _sysusersdir _target _target_alias _target_cpu _target_os _target_platform _target_vendor _timecheck _tmppath _topdir _unitdir _usr _usrsrc _var _vendor @@ -104,7 +105,7 @@ syn case ignore "%% PreAmble Section %% "Copyright and Serial were deprecated by License and Epoch syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier -syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|SourceLicense\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier +syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Recommends\|Suggests\|Supplements\|Enhances\|Icon\|URL\|SourceLicense\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|DistTag\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\|ModularityLabel\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier "%% Description Section %% syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment From 8869800f704ea0568d4741b960fc547f6853255f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 9 Nov 2025 18:59:52 +0000 Subject: [PATCH 30/54] runtime(vim): Update base syntax, match :*do command arg Match the Ex command arg to all :*do commands. closes: #18700 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/syntax/generator/gen_syntax_vim.vim | 12 +++- runtime/syntax/generator/vim.vim.base | 16 ++++- .../testdir/dumps/vim_ex_do_commands_00.dump | 20 +++++++ .../testdir/dumps/vim_ex_do_commands_01.dump | 20 +++++++ .../testdir/dumps/vim_ex_do_commands_02.dump | 20 +++++++ .../testdir/dumps/vim_ex_do_commands_03.dump | 20 +++++++ .../testdir/input/vim_ex_do_commands.vim | 58 +++++++++++++++++++ runtime/syntax/vim.vim | 26 ++++++--- 8 files changed, 182 insertions(+), 10 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/vim_ex_do_commands_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_do_commands_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_do_commands_02.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_do_commands_03.dump create mode 100644 runtime/syntax/testdir/input/vim_ex_do_commands.vim diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index 579dbbc396..ebf1e23755 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -1,7 +1,7 @@ " Vim syntax file generator " Language: Vim script " Maintainer: Hirohito Higashi (h_east) -" Last Change: 2025 Oct 11 +" Last Change: 2025 Nov 08 let s:keepcpo= &cpo set cpo&vim @@ -299,13 +299,17 @@ function s:get_vim_command_type(cmd_name) Print X abstract + argdo append augroup autocmd behave browse + bufdo call catch + cdo + cfdo chdir change class @@ -343,6 +347,8 @@ function s:get_vim_command_type(cmd_name) filetype filter final + folddoopen + folddoclosed for function grep @@ -356,6 +362,8 @@ function s:get_vim_command_type(cmd_name) join k let + ldo + lfdo loadkeymap lhelpgrep lgrep @@ -411,6 +419,7 @@ function s:get_vim_command_type(cmd_name) swapname syntax syntime + tabdo tcl tcldo tclfile @@ -428,6 +437,7 @@ function s:get_vim_command_type(cmd_name) vimgrepadd while wincmd + windo EOL " Required for original behavior " \ 'global', 'vglobal' diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 3be56651e6..dc523a2596 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 07 +" Last Change: 2025 Nov 08 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -246,7 +246,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" contains=vimCount " ===== syn match vimDefer "\" skipwhite nextgroup=@vimFunc,vim9LambdaParams +" *Do commands {{{2 +" ============ +syn match vimDoCommandBang contained "\a\@1<=!" skipwhite nextgroup=@vimCmdList + +syn keyword vimDoCommand argdo bufd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand tabd[o] wind[o] skipwhite nextgroup=@vimCmdList +syn keyword vimDoCommand cdo cfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand ld[o] lfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand foldd[oopen] folddoc[losed] skipwhite nextgroup=@vimCmdList + " Exception Handling {{{2 syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern @@ -2376,6 +2386,8 @@ if !exists("skip_vim_syntax_inits") hi def link vimDelfunctionBang vimBang hi def link vimDoautocmd vimCommand hi def link vimDoautocmdMod Special + hi def link vimDoCommand vimCommand + hi def link vimDoCommandBang vimBang hi def link vimEcho vimCommand hi def link vimEchohlNone vimGroup hi def link vimEchohl vimCommand diff --git a/runtime/syntax/testdir/dumps/vim_ex_do_commands_00.dump b/runtime/syntax/testdir/dumps/vim_ex_do_commands_00.dump new file mode 100644 index 0000000000..3b5518cb9e --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_do_commands_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|*|d|o| |c|o|m@1|a|n|d|s| +0#0000000&@55 +@75 +@75 +|a+0#af5f00255&|r|g|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +|a+0#af5f00255&|r|g|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +@75 +|b+0#af5f00255&|u|f|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +|b+0#af5f00255&|u|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +@75 +|c+0#af5f00255&|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@59 +|c+0#af5f00255&|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@59 +@75 +|c+0#af5f00255&|f|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +|c+0#af5f00255&|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +@75 +|f+0#af5f00255&|o|l|d@1|o|c|l|o|s|e|d| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@51 +@75 +|f+0#af5f00255&|o|l|d@1|o@1|p|e|n| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@53 +@75 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_do_commands_01.dump b/runtime/syntax/testdir/dumps/vim_ex_do_commands_01.dump new file mode 100644 index 0000000000..ccbca1b82a --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_do_commands_01.dump @@ -0,0 +1,20 @@ +|c+0#af5f00255#ffffff0|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +@75 +|f+0#af5f00255&|o|l|d@1|o|c|l|o|s|e|d| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@51 +@75 +|f+0#af5f00255&|o|l|d@1|o@1|p|e|n| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@53 +> @74 +|l+0#af5f00255&|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@59 +|l+0#af5f00255&|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@59 +@75 +|l+0#af5f00255&|f|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +|l+0#af5f00255&|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +@75 +|t+0#af5f00255&|a|b|d|o| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +@75 +|w+0#af5f00255&|i|n|d|o| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58 +@75 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|V|i|m|9|C|o|n|t|e|x|t|(+0#e000e06&|)| +0#0000000&@57 +@2|a+0#af5f00255&|r|g|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@55 +@57|1|9|,|0|-|1| @7|3@1|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_do_commands_02.dump b/runtime/syntax/testdir/dumps/vim_ex_do_commands_02.dump new file mode 100644 index 0000000000..cbdabcd357 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_do_commands_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@1|a+0#af5f00255&|r|g|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@55 +@2|a+0#af5f00255&|r|g|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@55 +@75 +@2|b+0#af5f00255&|u|f|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@55 +@2|b+0#af5f00255&|u|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@55 +> @74 +@2|c+0#af5f00255&|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +@2|c+0#af5f00255&|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +@75 +@2|c+0#af5f00255&|f|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@56 +@2|c+0#af5f00255&|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@56 +@75 +@2|f+0#af5f00255&|o|l|d@1|o|c|l|o|s|e|d| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@49 +@75 +@2|f+0#af5f00255&|o|l|d@1|o@1|p|e|n| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@51 +@75 +@2|l+0#af5f00255&|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +@2|l+0#af5f00255&|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57 +@75 +@57|3|7|,|0|-|1| @7|7|9|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_do_commands_03.dump b/runtime/syntax/testdir/dumps/vim_ex_do_commands_03.dump new file mode 100644 index 0000000000..8454ec94dc --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_do_commands_03.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +@2|l+0#af5f00255&|f|d|o| +0#0000000&@1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@56 +@2|l+0#af5f00255&|f|d|o|!| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@56 +@75 +@2|t+0#af5f00255&|a|b|d|o| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@56 +> @74 +@2|w+0#af5f00255&|i|n|d|o| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@56 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|5@1|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_do_commands.vim b/runtime/syntax/testdir/input/vim_ex_do_commands.vim new file mode 100644 index 0000000000..a4965940f2 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_do_commands.vim @@ -0,0 +1,58 @@ +" Vim :*do commands + + +argdo echo "..." +argdo! echo "..." + +bufdo echo "..." +bufdo! echo "..." + +cdo echo "..." +cdo! echo "..." + +cfdo echo "..." +cfdo! echo "..." + +folddoclosed echo "..." + +folddoopen echo "..." + +ldo echo "..." +ldo! echo "..." + +lfdo echo "..." +lfdo! echo "..." + +tabdo echo "..." + +windo echo "..." + + +def Vim9Context() + argdo echo "..." + argdo! echo "..." + + bufdo echo "..." + bufdo! echo "..." + + cdo echo "..." + cdo! echo "..." + + cfdo echo "..." + cfdo! echo "..." + + folddoclosed echo "..." + + folddoopen echo "..." + + ldo echo "..." + ldo! echo "..." + + lfdo echo "..." + lfdo! echo "..." + + tabdo echo "..." + + windo echo "..." +enddef + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index b9e05ddad6..3b6c80399c 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 07 +" Last Change: 2025 Nov 08 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -34,11 +34,11 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang' -syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] buffers bufd[o] bun[load] bw[ipeout] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] col[der] colo[rscheme] comc[lear] comp[iler] con[tinue] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] nextgroup=vimBang -syn keyword vimCommand contained delm[arks] deb[ug] defc[ompile] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] his[tory] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lex[pr] lf[ile] lfd[o] nextgroup=vimBang -syn keyword vimCommand contained lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] nextgroup=vimBang -syn keyword vimCommand contained ret[ab] rew[ind] ri[ght] ru[ntime] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] nextgroup=vimBang -syn keyword vimCommand contained te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] wind[o] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang +syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] buffers bun[load] bw[ipeout] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] col[der] colo[rscheme] comc[lear] comp[iler] con[tinue] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] delm[arks] deb[ug] defc[ompile] nextgroup=vimBang +syn keyword vimCommand contained di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] his[tory] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] le[ft] lex[pr] lf[ile] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lhi[story] ll lla[st] lli[st] nextgroup=vimBang +syn keyword vimCommand contained lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] rund[o] rv[iminfo] sN[ext] sa[rgument] nextgroup=vimBang +syn keyword vimCommand contained sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] nextgroup=vimBang +syn keyword vimCommand contained u[ndo] undoj[oin] undol[ist] unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang " Lower priority :syn-match to allow for :command/function() distinction syn match vimCommand "\" nextgroup=vimBang @@ -300,7 +300,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" contains=vimCount " ===== syn match vimDefer "\" skipwhite nextgroup=@vimFunc,vim9LambdaParams +" *Do commands {{{2 +" ============ +syn match vimDoCommandBang contained "\a\@1<=!" skipwhite nextgroup=@vimCmdList + +syn keyword vimDoCommand argdo bufd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand tabd[o] wind[o] skipwhite nextgroup=@vimCmdList +syn keyword vimDoCommand cdo cfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand ld[o] lfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList +syn keyword vimDoCommand foldd[oopen] folddoc[losed] skipwhite nextgroup=@vimCmdList + " Exception Handling {{{2 syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern @@ -2438,6 +2448,8 @@ if !exists("skip_vim_syntax_inits") hi def link vimDelfunctionBang vimBang hi def link vimDoautocmd vimCommand hi def link vimDoautocmdMod Special + hi def link vimDoCommand vimCommand + hi def link vimDoCommandBang vimBang hi def link vimEcho vimCommand hi def link vimEchohlNone vimGroup hi def link vimEchohl vimCommand From 542746521ff8d111f33c3c8ff298ba58966c9acc Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 9 Nov 2025 19:23:50 +0000 Subject: [PATCH 31/54] runtime(doc): Clean up file header whitespace - :retab! line 1 and line 4 (main page heading). - Use four columns whitespace before "by [Author]" in the user manual heading to match the reference manual formatting. - double space headings. closes: #18648 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/arabic.txt | 4 ++-- runtime/doc/autocmd.txt | 4 ++-- runtime/doc/builtin.txt | 4 ++-- runtime/doc/change.txt | 4 ++-- runtime/doc/channel.txt | 4 ++-- runtime/doc/cmdline.txt | 4 ++-- runtime/doc/debug.txt | 4 ++-- runtime/doc/debugger.txt | 4 ++-- runtime/doc/develop.txt | 4 ++-- runtime/doc/diff.txt | 4 ++-- runtime/doc/digraph.txt | 4 ++-- runtime/doc/editing.txt | 4 ++-- runtime/doc/eval.txt | 4 ++-- runtime/doc/farsi.txt | 4 ++-- runtime/doc/filetype.txt | 4 ++-- runtime/doc/fold.txt | 4 ++-- runtime/doc/gui.txt | 4 ++-- runtime/doc/gui_w32.txt | 4 ++-- runtime/doc/gui_x11.txt | 4 ++-- runtime/doc/hangulin.txt | 5 +++-- runtime/doc/hebrew.txt | 4 ++-- runtime/doc/helphelp.txt | 4 ++-- runtime/doc/howto.txt | 4 ++-- runtime/doc/if_cscop.txt | 5 +++-- runtime/doc/if_lua.txt | 4 ++-- runtime/doc/if_mzsch.txt | 4 ++-- runtime/doc/if_ole.txt | 4 ++-- runtime/doc/if_perl.txt | 5 +++-- runtime/doc/if_pyth.txt | 4 ++-- runtime/doc/if_ruby.txt | 5 +++-- runtime/doc/if_sniff.txt | 4 ++-- runtime/doc/if_tcl.txt | 4 ++-- runtime/doc/indent.txt | 4 ++-- runtime/doc/index.txt | 5 +++-- runtime/doc/insert.txt | 4 ++-- runtime/doc/intro.txt | 4 ++-- runtime/doc/map.txt | 4 ++-- runtime/doc/mbyte.txt | 4 ++-- runtime/doc/message.txt | 4 ++-- runtime/doc/mlang.txt | 4 ++-- runtime/doc/motion.txt | 4 ++-- runtime/doc/netbeans.txt | 4 ++-- runtime/doc/options.txt | 4 ++-- runtime/doc/os_390.txt | 5 +++-- runtime/doc/os_amiga.txt | 4 ++-- runtime/doc/os_beos.txt | 4 ++-- runtime/doc/os_dos.txt | 4 ++-- runtime/doc/os_haiku.txt | 4 ++-- runtime/doc/os_mac.txt | 4 ++-- runtime/doc/os_mint.txt | 4 ++-- runtime/doc/os_msdos.txt | 4 ++-- runtime/doc/os_os2.txt | 4 ++-- runtime/doc/os_qnx.txt | 4 ++-- runtime/doc/os_risc.txt | 4 ++-- runtime/doc/os_unix.txt | 4 ++-- runtime/doc/os_vms.txt | 2 +- runtime/doc/os_win32.txt | 4 ++-- runtime/doc/pattern.txt | 4 ++-- runtime/doc/pi_gzip.txt | 4 ++-- runtime/doc/pi_paren.txt | 4 ++-- runtime/doc/popup.txt | 4 ++-- runtime/doc/print.txt | 4 ++-- runtime/doc/quickfix.txt | 4 ++-- runtime/doc/quickref.txt | 5 +++-- runtime/doc/quotes.txt | 4 ++-- runtime/doc/recover.txt | 4 ++-- runtime/doc/remote.txt | 4 ++-- runtime/doc/repeat.txt | 4 ++-- runtime/doc/rileft.txt | 4 ++-- runtime/doc/russian.txt | 4 ++-- runtime/doc/scroll.txt | 4 ++-- runtime/doc/sign.txt | 4 ++-- runtime/doc/sponsor.txt | 4 ++-- runtime/doc/starting.txt | 4 ++-- runtime/doc/tabpage.txt | 4 ++-- runtime/doc/tagsrch.txt | 4 ++-- runtime/doc/term.txt | 4 ++-- runtime/doc/textprop.txt | 4 ++-- runtime/doc/tips.txt | 4 ++-- runtime/doc/todo.txt | 2 +- runtime/doc/uganda.txt | 4 ++-- runtime/doc/undo.txt | 2 +- runtime/doc/usr_01.txt | 4 ++-- runtime/doc/usr_02.txt | 4 ++-- runtime/doc/usr_03.txt | 4 ++-- runtime/doc/usr_04.txt | 4 ++-- runtime/doc/usr_05.txt | 4 ++-- runtime/doc/usr_06.txt | 4 ++-- runtime/doc/usr_07.txt | 4 ++-- runtime/doc/usr_08.txt | 4 ++-- runtime/doc/usr_09.txt | 4 ++-- runtime/doc/usr_10.txt | 4 ++-- runtime/doc/usr_11.txt | 4 ++-- runtime/doc/usr_12.txt | 4 ++-- runtime/doc/usr_20.txt | 4 ++-- runtime/doc/usr_21.txt | 4 ++-- runtime/doc/usr_22.txt | 4 ++-- runtime/doc/usr_23.txt | 4 ++-- runtime/doc/usr_24.txt | 4 ++-- runtime/doc/usr_25.txt | 4 ++-- runtime/doc/usr_26.txt | 4 ++-- runtime/doc/usr_27.txt | 4 ++-- runtime/doc/usr_28.txt | 4 ++-- runtime/doc/usr_29.txt | 4 ++-- runtime/doc/usr_30.txt | 4 ++-- runtime/doc/usr_31.txt | 4 ++-- runtime/doc/usr_32.txt | 4 ++-- runtime/doc/usr_40.txt | 4 ++-- runtime/doc/usr_41.txt | 4 ++-- runtime/doc/usr_42.txt | 4 ++-- runtime/doc/usr_43.txt | 4 ++-- runtime/doc/usr_44.txt | 4 ++-- runtime/doc/usr_45.txt | 4 ++-- runtime/doc/usr_50.txt | 4 ++-- runtime/doc/usr_51.txt | 4 ++-- runtime/doc/usr_52.txt | 4 ++-- runtime/doc/usr_90.txt | 4 ++-- runtime/doc/usr_toc.txt | 4 ++-- runtime/doc/various.txt | 4 ++-- runtime/doc/version4.txt | 4 ++-- runtime/doc/version5.txt | 4 ++-- runtime/doc/version6.txt | 4 ++-- runtime/doc/version7.txt | 4 ++-- runtime/doc/version8.txt | 4 ++-- runtime/doc/version9.txt | 4 ++-- runtime/doc/vi_diff.txt | 4 ++-- runtime/doc/vietnamese.txt | 4 ++-- runtime/doc/visual.txt | 4 ++-- runtime/doc/wayland.txt | 4 ++-- runtime/doc/windows.txt | 4 ++-- runtime/doc/workshop.txt | 4 ++-- 131 files changed, 266 insertions(+), 259 deletions(-) diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 72c9ed8e12..832b426dda 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -1,7 +1,7 @@ -*arabic.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*arabic.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Nadim Shaikli + VIM REFERENCE MANUAL by Nadim Shaikli Arabic Language support (options & mappings) for Vim *Arabic* diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 134d914772..2d743ef7c3 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,7 +1,7 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*autocmd.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Automatic commands *autocommand* *autocommands* diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index b37a25bf1f..229832c9df 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,7 +1,7 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 08 +*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Builtin functions *builtin-functions* diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 878d38851d..7320460615 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,7 +1,7 @@ -*change.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*change.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar This file describes commands that delete or change text. In this context, diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index 2965483465..1750d1cb28 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -1,7 +1,7 @@ -*channel.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*channel.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Inter-process communication *channel* diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index ede9a5ec03..4c607c9179 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,7 +1,7 @@ -*cmdline.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*cmdline.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *Cmdline-mode* *Command-line-mode* diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 4e75c174b8..eee4089a47 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -1,7 +1,7 @@ -*debug.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*debug.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Debugging Vim *debug-vim* diff --git a/runtime/doc/debugger.txt b/runtime/doc/debugger.txt index 164dfbf902..6cb01466f8 100644 --- a/runtime/doc/debugger.txt +++ b/runtime/doc/debugger.txt @@ -1,7 +1,7 @@ -*debugger.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*debugger.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Gordon Prieur + VIM REFERENCE MANUAL by Gordon Prieur Debugger Support Features *debugger-support* diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 922da72727..e6aeed0452 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,7 +1,7 @@ -*develop.txt* For Vim version 9.1. Last change: 2025 Oct 09 +*develop.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Development of Vim. *development* diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 419373a8de..8ff2937f00 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,7 +1,7 @@ -*diff.txt* For Vim version 9.1. Last change: 2025 Oct 14 +*diff.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *diff* *vimdiff* *gvimdiff* *diff-mode* diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index ac3ae71b5c..575ae822b2 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -1,7 +1,7 @@ -*digraph.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*digraph.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Digraphs *digraph* *digraphs* *Digraphs* diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 6141dcec12..2e75fb9a80 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,7 +1,7 @@ -*editing.txt* For Vim version 9.1. Last change: 2025 Oct 14 +*editing.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Editing files *edit-files* diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b4b28e80cc..8121ad2fe0 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,7 +1,7 @@ -*eval.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*eval.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Expression evaluation *expression* *expr* *E15* *eval* diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index f4474038d4..d5ae408935 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -1,7 +1,7 @@ -*farsi.txt* For Vim version 9.1. Last change: 2019 May 05 +*farsi.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Mortaza Ghassab Shiran + VIM REFERENCE MANUAL by Mortaza Ghassab Shiran Right to Left and Farsi Mapping for Vim *farsi* *Farsi* diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index b363b11293..5011b05699 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,7 +1,7 @@ -*filetype.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*filetype.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Filetypes *filetype* *file-type* diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 40cff059c6..dd2a0a04b4 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -1,7 +1,7 @@ -*fold.txt* For Vim version 9.1. Last change: 2025 Oct 03 +*fold.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Folding *Folding* *folding* *folds* diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index d69d603e85..bcb542364c 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1,7 +1,7 @@ -*gui.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*gui.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Vim's Graphical User Interface *gui* *GUI* diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt index 1c33ff6962..6dc53a0446 100644 --- a/runtime/doc/gui_w32.txt +++ b/runtime/doc/gui_w32.txt @@ -1,7 +1,7 @@ -*gui_w32.txt* For Vim version 9.1. Last change: 2025 Oct 11 +*gui_w32.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Vim's Win32 Graphical User Interface *gui-w32* *win32-gui* diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index a479c7cc06..f6ccd59ed7 100644 --- a/runtime/doc/gui_x11.txt +++ b/runtime/doc/gui_x11.txt @@ -1,7 +1,7 @@ -*gui_x11.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*gui_x11.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Vim's Graphical User Interface *gui-x11* *GUI-X11* diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt index 3f37d8eb83..a643c2fa40 100644 --- a/runtime/doc/hangulin.txt +++ b/runtime/doc/hangulin.txt @@ -1,7 +1,8 @@ -*hangulin.txt* For Vim version 9.1. Last change: 2019 Nov 21 +*hangulin.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam + VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam + *hangul* Vim had built-in support for hangul, the Korean language, for users without diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index 64b9c60bc6..2cbd81979a 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -1,7 +1,7 @@ -*hebrew.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*hebrew.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Ron Aaron and Avner Lottem + VIM REFERENCE MANUAL by Ron Aaron and Avner Lottem Hebrew Language support (options & mapping) for Vim *hebrew* diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index d10cb2c14a..eb90fe9f13 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,7 +1,7 @@ -*helphelp.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*helphelp.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Help on help files *helphelp* diff --git a/runtime/doc/howto.txt b/runtime/doc/howto.txt index 2d8c8b5c4f..596afb83d7 100644 --- a/runtime/doc/howto.txt +++ b/runtime/doc/howto.txt @@ -1,7 +1,7 @@ -*howto.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*howto.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar How to ... *howdoi* *how-do-i* *howto* *how-to* diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index e96a04ecf1..1ecd5ba719 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -1,7 +1,8 @@ -*if_cscop.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*if_cscop.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Andy Kahn + VIM REFERENCE MANUAL by Andy Kahn + *cscope* *Cscope* This document explains how to use Vim's cscope interface. diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index f0d77cffda..20183858d7 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -1,7 +1,7 @@ -*if_lua.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*if_lua.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Luis Carvalho + VIM REFERENCE MANUAL by Luis Carvalho The Lua Interface to Vim *lua* *Lua* diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index d76816dbec..8159eb678f 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -1,7 +1,7 @@ -*if_mzsch.txt* For Vim version 9.1. Last change: 2025 Oct 14 +*if_mzsch.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Sergey Khorev + VIM REFERENCE MANUAL by Sergey Khorev The MzScheme Interface to Vim *mzscheme* *MzScheme* diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt index c546e971a6..c0f1472c6e 100644 --- a/runtime/doc/if_ole.txt +++ b/runtime/doc/if_ole.txt @@ -1,7 +1,7 @@ -*if_ole.txt* For Vim version 9.1. Last change: 2023 Nov 19 +*if_ole.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Paul Moore + VIM REFERENCE MANUAL by Paul Moore The OLE Interface to Vim *ole-interface* diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt index 616c3b31cd..54fd6a0be4 100644 --- a/runtime/doc/if_perl.txt +++ b/runtime/doc/if_perl.txt @@ -1,9 +1,10 @@ -*if_perl.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*if_perl.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Sven Verdoolaege + VIM REFERENCE MANUAL by Sven Verdoolaege and Matt Gerassimof + Perl and Vim *perl* *Perl* 1. Editing Perl files |perl-editing| diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 0402e2cbbd..65d1c8bedf 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,7 +1,7 @@ -*if_pyth.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*if_pyth.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Paul Moore + VIM REFERENCE MANUAL by Paul Moore The Python Interface to Vim *python* *Python* diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt index c024b48e3c..14558fab1e 100644 --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -1,7 +1,8 @@ -*if_ruby.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*if_ruby.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Shugo Maeda + VIM REFERENCE MANUAL by Shugo Maeda + The Ruby Interface to Vim *ruby* *Ruby* diff --git a/runtime/doc/if_sniff.txt b/runtime/doc/if_sniff.txt index ff587ad249..eeff3cd5d8 100644 --- a/runtime/doc/if_sniff.txt +++ b/runtime/doc/if_sniff.txt @@ -1,7 +1,7 @@ -*if_sniff.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*if_sniff.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Anton Leherbauer + VIM REFERENCE MANUAL by Anton Leherbauer The SNiFF+ support was removed at patch 7.4.1433. If you want to check it out diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt index a5c098297d..c925944023 100644 --- a/runtime/doc/if_tcl.txt +++ b/runtime/doc/if_tcl.txt @@ -1,7 +1,7 @@ -*if_tcl.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*if_tcl.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Ingo Wilken + VIM REFERENCE MANUAL by Ingo Wilken The Tcl Interface to Vim *tcl* *Tcl* *TCL* diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index afd3954654..0be5703687 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1,7 +1,7 @@ -*indent.txt* For Vim version 9.1. Last change: 2025 Oct 14 +*indent.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar This file is about indenting C programs and other files. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index a46f46c699..ce85915bd7 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,7 +1,8 @@ -*index.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*index.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar + *index* This file contains a list of all commands for each mode, with a tag and a diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index b0bd39a281..28536d1bc2 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,7 +1,7 @@ -*insert.txt* For Vim version 9.1. Last change: 2025 Oct 17 +*insert.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *Insert* *Insert-mode* diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 46aa9428f3..a25c313428 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,7 +1,7 @@ -*intro.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*intro.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Introduction to Vim *ref* *reference* diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index ac8f177f29..ee46180a65 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,7 +1,7 @@ -*map.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*map.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Key mapping, abbreviations and user-defined commands. diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index e7ca6da86d..1bbc14682e 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,7 +1,7 @@ -*mbyte.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*mbyte.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar et al. + VIM REFERENCE MANUAL by Bram Moolenaar et al. Multi-byte support *multibyte* *multi-byte* diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index a8d7b577c8..2411440f49 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,7 +1,7 @@ -*message.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*message.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar This file contains an alphabetical list of messages and error messages that diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index e98e15e1dd..4719126c76 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -1,7 +1,7 @@ -*mlang.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*mlang.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Multi-language features *multilang* *multi-lang* diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index e0c9d8ba64..582712fbb0 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,7 +1,7 @@ -*motion.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*motion.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Cursor motions *cursor-motions* *navigation* diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index 871302616f..1332a8fb98 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1,7 +1,7 @@ -*netbeans.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*netbeans.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Gordon Prieur et al. + VIM REFERENCE MANUAL by Gordon Prieur et al. *netbeans* *NetBeans* *netbeans-support* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 97c0fd9bc1..e6bb6413e7 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,7 +1,7 @@ -*options.txt* For Vim version 9.1. Last change: 2025 Oct 28 +*options.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Options *options* diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt index b30c1b2b06..4d2b7e8a7b 100644 --- a/runtime/doc/os_390.txt +++ b/runtime/doc/os_390.txt @@ -1,7 +1,8 @@ -*os_390.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*os_390.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Ralf Schandl + VIM REFERENCE MANUAL by Ralf Schandl + *zOS* *z/OS* *OS390* *os390* *MVS* This file contains the particulars for the z/OS UNIX version of Vim. diff --git a/runtime/doc/os_amiga.txt b/runtime/doc/os_amiga.txt index 046a24fb94..1fc95cf84b 100644 --- a/runtime/doc/os_amiga.txt +++ b/runtime/doc/os_amiga.txt @@ -1,7 +1,7 @@ -*os_amiga.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_amiga.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *Amiga* diff --git a/runtime/doc/os_beos.txt b/runtime/doc/os_beos.txt index 5ac41597ff..5ad853e6ee 100644 --- a/runtime/doc/os_beos.txt +++ b/runtime/doc/os_beos.txt @@ -1,7 +1,7 @@ -*os_beos.txt* For Vim version 9.1. Last change: 2020 Jun 07 +*os_beos.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *beos* *BeOS* *BeBox* diff --git a/runtime/doc/os_dos.txt b/runtime/doc/os_dos.txt index 7e85f7145a..da11d53dc2 100644 --- a/runtime/doc/os_dos.txt +++ b/runtime/doc/os_dos.txt @@ -1,7 +1,7 @@ -*os_dos.txt* For Vim version 9.1. Last change: 2025 Aug 06 +*os_dos.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *dos* *DOS* diff --git a/runtime/doc/os_haiku.txt b/runtime/doc/os_haiku.txt index bdabbb14fa..8ad23c3fa6 100644 --- a/runtime/doc/os_haiku.txt +++ b/runtime/doc/os_haiku.txt @@ -1,7 +1,7 @@ -*os_haiku.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_haiku.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *Haiku* diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index 7e81b909aa..1491550148 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -1,7 +1,7 @@ -*os_mac.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_mac.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar et al. + VIM REFERENCE MANUAL by Bram Moolenaar et al. *mac* *Mac* *macintosh* *Macintosh* diff --git a/runtime/doc/os_mint.txt b/runtime/doc/os_mint.txt index 4ad0399d79..67f999b553 100644 --- a/runtime/doc/os_mint.txt +++ b/runtime/doc/os_mint.txt @@ -1,7 +1,7 @@ -*os_mint.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_mint.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Jens M. Felderhoff + VIM REFERENCE MANUAL by Jens M. Felderhoff *MiNT* *Atari* diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt index d6d67f0040..b2cdba4854 100644 --- a/runtime/doc/os_msdos.txt +++ b/runtime/doc/os_msdos.txt @@ -1,7 +1,7 @@ -*os_msdos.txt* For Vim version 9.1. Last change: 2016 Feb 26 +*os_msdos.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *msdos* *ms-dos* *MSDOS* *MS-DOS* diff --git a/runtime/doc/os_os2.txt b/runtime/doc/os_os2.txt index bd24d139ae..69faf08267 100644 --- a/runtime/doc/os_os2.txt +++ b/runtime/doc/os_os2.txt @@ -1,7 +1,7 @@ -*os_os2.txt* For Vim version 9.1. Last change: 2015 Dec 31 +*os_os2.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Paul Slootman + VIM REFERENCE MANUAL by Paul Slootman *os2* *OS2* *OS/2* diff --git a/runtime/doc/os_qnx.txt b/runtime/doc/os_qnx.txt index e55bdf82e3..d4e2f1ee86 100644 --- a/runtime/doc/os_qnx.txt +++ b/runtime/doc/os_qnx.txt @@ -1,7 +1,7 @@ -*os_qnx.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_qnx.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Julian Kinraid + VIM REFERENCE MANUAL by Julian Kinraid *QNX* *qnx* diff --git a/runtime/doc/os_risc.txt b/runtime/doc/os_risc.txt index dad3549b98..fb5d57caf3 100644 --- a/runtime/doc/os_risc.txt +++ b/runtime/doc/os_risc.txt @@ -1,7 +1,7 @@ -*os_risc.txt* For Vim version 9.1. Last change: 2011 May 10 +*os_risc.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Thomas Leonard + VIM REFERENCE MANUAL by Thomas Leonard *riscos* *RISCOS* *RISC-OS* diff --git a/runtime/doc/os_unix.txt b/runtime/doc/os_unix.txt index 90069a20b2..029f9998ed 100644 --- a/runtime/doc/os_unix.txt +++ b/runtime/doc/os_unix.txt @@ -1,7 +1,7 @@ -*os_unix.txt* For Vim version 9.1. Last change: 2022 Nov 25 +*os_unix.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *unix* *Unix* diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index 8a800c10c9..ab072d48b3 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -1,4 +1,4 @@ -*os_vms.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_vms.txt* For Vim version 9.1. Last change: 2025 Nov 09 VIM REFERENCE MANUAL diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index 53b967f896..4831ff43f6 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,7 +1,7 @@ -*os_win32.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*os_win32.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by George Reilly + VIM REFERENCE MANUAL by George Reilly *win32* *Win32* *MS-Windows* diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 3381694595..6cafb688a7 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,7 +1,7 @@ -*pattern.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*pattern.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Patterns and search commands *pattern-searches* diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index cb4fc6b3b8..23e2610da7 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -1,7 +1,7 @@ -*pi_gzip.txt* For Vim version 9.1. Last change: 2025 Mar 05 +*pi_gzip.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Editing compressed files with Vim *gzip* *bzip2* *compress* diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index 049889699d..81d941313c 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -1,7 +1,7 @@ -*pi_paren.txt* For Vim version 9.1. Last change: 2024 Nov 04 +*pi_paren.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Highlighting matching parens *matchparen* diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index 41f4da5455..794e50d60f 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,7 +1,7 @@ -*popup.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*popup.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Displaying text in a floating window. *popup* *popup-window* *popupwin* diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index f5842fb48b..30c498064d 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -1,7 +1,7 @@ -*print.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*print.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Printing *printing* diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index a3226020aa..0044ab85d5 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,7 +1,7 @@ -*quickfix.txt* For Vim version 9.1. Last change: 2025 Oct 28 +*quickfix.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar This subject is introduced in section |30.1| of the user manual. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index e7dd45f824..f3a68ea025 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,7 +1,8 @@ -*quickref.txt* For Vim version 9.1. Last change: 2025 Aug 23 +*quickref.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar + Quick reference guide diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 0eeb1b6916..590aaae72d 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -1,7 +1,7 @@ -*quotes.txt* For Vim version 9.1. Last change: 2018 Mar 29 +*quotes.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *quotes* diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index b399b23933..3d919be498 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -1,7 +1,7 @@ -*recover.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*recover.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Recovery after a crash *crash-recovery* diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index 79c9011b03..89bb91434a 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -1,7 +1,7 @@ -*remote.txt* For Vim version 9.1. Last change: 2025 Aug 22 +*remote.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Vim client-server communication *client-server* diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 79b293c576..be31c098eb 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,7 +1,7 @@ -*repeat.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*repeat.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Repeating commands, Vim scripts and debugging *repeating* diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt index 8589bb6a35..108c996b36 100644 --- a/runtime/doc/rileft.txt +++ b/runtime/doc/rileft.txt @@ -1,7 +1,7 @@ -*rileft.txt* For Vim version 9.1. Last change: 2022 Oct 12 +*rileft.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Avner Lottem + VIM REFERENCE MANUAL by Avner Lottem updated by Nadim Shaikli diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt index bf6493d5e3..24b96619dd 100644 --- a/runtime/doc/russian.txt +++ b/runtime/doc/russian.txt @@ -1,7 +1,7 @@ -*russian.txt* For Vim version 9.1. Last change: 2006 Apr 24 +*russian.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Vassily Ragosin + VIM REFERENCE MANUAL by Vassily Ragosin Russian language localization and support in Vim *russian* *Russian* diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index f0ec16b6f8..055f8254de 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -1,7 +1,7 @@ -*scroll.txt* For Vim version 9.1. Last change: 2024 Jul 06 +*scroll.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Scrolling *scrolling* diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index f49f74e944..12982d7e48 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,7 +1,7 @@ -*sign.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*sign.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Gordon Prieur + VIM REFERENCE MANUAL by Gordon Prieur and Bram Moolenaar diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index 4222160028..4a1728dc09 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -1,7 +1,7 @@ -*sponsor.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*sponsor.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 7f718d7b6d..19b5e67d52 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,7 +1,7 @@ -*starting.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*starting.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Starting Vim *starting* diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 590221bc36..73a9ddbc02 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,7 +1,7 @@ -*tabpage.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*tabpage.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Editing with windows in multiple tab pages. *tab-page* *tabpage* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index dcd6f05c3e..17f7234639 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -1,7 +1,7 @@ -*tagsrch.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*tagsrch.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Tags and special searches *tags-and-searches* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index e2f9b659af..784105fe6e 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,7 +1,7 @@ -*term.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*term.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Terminal information *terminal-info* diff --git a/runtime/doc/textprop.txt b/runtime/doc/textprop.txt index fbef22842b..87374d6233 100644 --- a/runtime/doc/textprop.txt +++ b/runtime/doc/textprop.txt @@ -1,7 +1,7 @@ -*textprop.txt* For Vim version 9.1. Last change: 2025 Oct 14 +*textprop.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Displaying text with properties attached. *textprop* *text-properties* diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt index c362bea164..cd3b5d0529 100644 --- a/runtime/doc/tips.txt +++ b/runtime/doc/tips.txt @@ -1,7 +1,7 @@ -*tips.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*tips.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Tips and ideas for using Vim *tips* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index cdafaf05e9..6d9c234b8f 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 9.1. Last change: 2025 Sep 02 +*todo.txt* For Vim version 9.1. Last change: 2025 Nov 09 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index 47ae640e52..6737b30f16 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -1,7 +1,7 @@ -*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*uganda.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *uganda* *Uganda* *copying* *copyright* *license* diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt index e8a0417eed..2726013460 100644 --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -1,4 +1,4 @@ -*undo.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*undo.txt* For Vim version 9.1. Last change: 2025 Nov 09 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index 2f6f42b971..b1c5235a51 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -1,7 +1,7 @@ -*usr_01.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*usr_01.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar About the manuals diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index 2b06376a64..b3cdabc9f8 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -1,7 +1,7 @@ -*usr_02.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_02.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar The first steps in Vim diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index c5b5fe95e6..2155e3de4f 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -1,7 +1,7 @@ -*usr_03.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_03.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Moving around diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index 60fb09a215..6010979763 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -1,7 +1,7 @@ -*usr_04.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_04.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Making small changes diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 427b597c3f..32f8431d36 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,7 +1,7 @@ -*usr_05.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_05.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Set your settings diff --git a/runtime/doc/usr_06.txt b/runtime/doc/usr_06.txt index d84444db3f..2d20897f8f 100644 --- a/runtime/doc/usr_06.txt +++ b/runtime/doc/usr_06.txt @@ -1,7 +1,7 @@ -*usr_06.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_06.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Using syntax highlighting diff --git a/runtime/doc/usr_07.txt b/runtime/doc/usr_07.txt index 2ac30ec26b..d02a4a2f61 100644 --- a/runtime/doc/usr_07.txt +++ b/runtime/doc/usr_07.txt @@ -1,7 +1,7 @@ -*usr_07.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_07.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Editing more than one file diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt index 1237c363fa..b9891b97af 100644 --- a/runtime/doc/usr_08.txt +++ b/runtime/doc/usr_08.txt @@ -1,7 +1,7 @@ -*usr_08.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_08.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Splitting windows diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt index a6b2f16b27..556d81c1a4 100644 --- a/runtime/doc/usr_09.txt +++ b/runtime/doc/usr_09.txt @@ -1,7 +1,7 @@ -*usr_09.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_09.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Using the GUI diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt index 6d3e89b791..d943c97390 100644 --- a/runtime/doc/usr_10.txt +++ b/runtime/doc/usr_10.txt @@ -1,7 +1,7 @@ -*usr_10.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_10.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Making big changes diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt index f33daf6821..c6081ad60d 100644 --- a/runtime/doc/usr_11.txt +++ b/runtime/doc/usr_11.txt @@ -1,7 +1,7 @@ -*usr_11.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_11.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Recovering from a crash diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt index 4ca4a8c245..5aa688b8d8 100644 --- a/runtime/doc/usr_12.txt +++ b/runtime/doc/usr_12.txt @@ -1,7 +1,7 @@ -*usr_12.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_12.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Clever tricks diff --git a/runtime/doc/usr_20.txt b/runtime/doc/usr_20.txt index 7bd2faa3f6..8e999fc814 100644 --- a/runtime/doc/usr_20.txt +++ b/runtime/doc/usr_20.txt @@ -1,7 +1,7 @@ -*usr_20.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_20.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Typing command-line commands quickly diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index 8621887a49..7e5d361542 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -1,7 +1,7 @@ -*usr_21.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_21.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Go away and come back diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index 8bdabe7208..cb5700ac6a 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -1,7 +1,7 @@ -*usr_22.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_22.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Finding the file to edit diff --git a/runtime/doc/usr_23.txt b/runtime/doc/usr_23.txt index e5ba25aee5..34b8fa0b19 100644 --- a/runtime/doc/usr_23.txt +++ b/runtime/doc/usr_23.txt @@ -1,7 +1,7 @@ -*usr_23.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_23.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Editing other files diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt index 04cdc81cdc..22b41f790e 100644 --- a/runtime/doc/usr_24.txt +++ b/runtime/doc/usr_24.txt @@ -1,7 +1,7 @@ -*usr_24.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_24.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Inserting quickly diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt index 71e96c7767..62aa55e108 100644 --- a/runtime/doc/usr_25.txt +++ b/runtime/doc/usr_25.txt @@ -1,7 +1,7 @@ -*usr_25.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_25.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Editing formatted text diff --git a/runtime/doc/usr_26.txt b/runtime/doc/usr_26.txt index 3dc54543aa..cda0a22bf2 100644 --- a/runtime/doc/usr_26.txt +++ b/runtime/doc/usr_26.txt @@ -1,7 +1,7 @@ -*usr_26.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_26.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Repeating diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt index ab21e00b24..12facf84b2 100644 --- a/runtime/doc/usr_27.txt +++ b/runtime/doc/usr_27.txt @@ -1,7 +1,7 @@ -*usr_27.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_27.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Search commands and patterns diff --git a/runtime/doc/usr_28.txt b/runtime/doc/usr_28.txt index ad06cc0a69..746e03ee09 100644 --- a/runtime/doc/usr_28.txt +++ b/runtime/doc/usr_28.txt @@ -1,7 +1,7 @@ -*usr_28.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_28.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Folding diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index fe1a79f789..cb878ce5a6 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -1,7 +1,7 @@ -*usr_29.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_29.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Moving through programs diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index c6c1b443d6..1ab4fb2694 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -1,7 +1,7 @@ -*usr_30.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_30.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Editing programs diff --git a/runtime/doc/usr_31.txt b/runtime/doc/usr_31.txt index 5e65f6827a..077398272f 100644 --- a/runtime/doc/usr_31.txt +++ b/runtime/doc/usr_31.txt @@ -1,7 +1,7 @@ -*usr_31.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_31.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Exploiting the GUI diff --git a/runtime/doc/usr_32.txt b/runtime/doc/usr_32.txt index ee3ad62a33..0194a9355c 100644 --- a/runtime/doc/usr_32.txt +++ b/runtime/doc/usr_32.txt @@ -1,7 +1,7 @@ -*usr_32.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_32.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar The undo tree diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index 86a5c69e22..12a6069987 100644 --- a/runtime/doc/usr_40.txt +++ b/runtime/doc/usr_40.txt @@ -1,7 +1,7 @@ -*usr_40.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_40.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Make new commands diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index b642909359..5880b344fd 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,7 +1,7 @@ -*usr_41.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_41.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Write a Vim script diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt index 9086a619f3..c47bc8207b 100644 --- a/runtime/doc/usr_42.txt +++ b/runtime/doc/usr_42.txt @@ -1,7 +1,7 @@ -*usr_42.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_42.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Add new menus diff --git a/runtime/doc/usr_43.txt b/runtime/doc/usr_43.txt index e7a52392bb..31413c6eba 100644 --- a/runtime/doc/usr_43.txt +++ b/runtime/doc/usr_43.txt @@ -1,7 +1,7 @@ -*usr_43.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_43.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Using filetypes diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index 4de0861322..0dba0b0df3 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -1,7 +1,7 @@ -*usr_44.txt* For Vim version 9.1. Last change: 2025 Nov 07 +*usr_44.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Your own syntax highlighted diff --git a/runtime/doc/usr_45.txt b/runtime/doc/usr_45.txt index 175d4fc394..cebf259a8c 100644 --- a/runtime/doc/usr_45.txt +++ b/runtime/doc/usr_45.txt @@ -1,7 +1,7 @@ -*usr_45.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_45.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Select your language (locale) diff --git a/runtime/doc/usr_50.txt b/runtime/doc/usr_50.txt index 6082ce2a0b..e846bc1300 100644 --- a/runtime/doc/usr_50.txt +++ b/runtime/doc/usr_50.txt @@ -1,7 +1,7 @@ -*usr_50.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_50.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Advanced Vim script writing diff --git a/runtime/doc/usr_51.txt b/runtime/doc/usr_51.txt index 3b43d2731d..293581e011 100644 --- a/runtime/doc/usr_51.txt +++ b/runtime/doc/usr_51.txt @@ -1,7 +1,7 @@ -*usr_51.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_51.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Write plugins diff --git a/runtime/doc/usr_52.txt b/runtime/doc/usr_52.txt index d013535aee..dc1919bacd 100644 --- a/runtime/doc/usr_52.txt +++ b/runtime/doc/usr_52.txt @@ -1,7 +1,7 @@ -*usr_52.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_52.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Write larger plugins diff --git a/runtime/doc/usr_90.txt b/runtime/doc/usr_90.txt index 2a9dd952ca..ca1b3c6ab5 100644 --- a/runtime/doc/usr_90.txt +++ b/runtime/doc/usr_90.txt @@ -1,7 +1,7 @@ -*usr_90.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_90.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Installing Vim diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt index de2ec1dc66..61172d60d6 100644 --- a/runtime/doc/usr_toc.txt +++ b/runtime/doc/usr_toc.txt @@ -1,7 +1,7 @@ -*usr_toc.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*usr_toc.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM USER MANUAL by Bram Moolenaar + VIM USER MANUAL by Bram Moolenaar Table Of Contents *user-manual* *usr* diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 8b245b38c2..42b0b66578 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,7 +1,7 @@ -*various.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*various.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Various commands *various* diff --git a/runtime/doc/version4.txt b/runtime/doc/version4.txt index d911cce4ee..a54eded96b 100644 --- a/runtime/doc/version4.txt +++ b/runtime/doc/version4.txt @@ -1,7 +1,7 @@ -*version4.txt* For Vim version 9.1. Last change: 2025 Aug 06 +*version4.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar This document lists the incompatible differences between Vim 3.0 and Vim 4.0. diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt index 2f30f8ec9a..d656e2446b 100644 --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -1,7 +1,7 @@ -*version5.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*version5.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Welcome to Vim Version 5.0! diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index 5f6f0c0e8f..4b98404d80 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,7 +1,7 @@ -*version6.txt* For Vim version 9.1. Last change: 2025 Jul 22 +*version6.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Welcome to Vim Version 6.0! A large number of features has been added. This diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index d47f1b6ad3..7a1306ad2b 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,7 +1,7 @@ -*version7.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*version7.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *vim7* *version-7.0* *version7.0* diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt index cfb6f1e3d7..03d1464504 100644 --- a/runtime/doc/version8.txt +++ b/runtime/doc/version8.txt @@ -1,7 +1,7 @@ -*version8.txt* For Vim version 9.1. Last change: 2025 Jul 21 +*version8.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *vim8* *vim-8* *version-8.0* *version8.0* diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 344a55e012..b8216dfb68 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,7 +1,7 @@ -*version9.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*version9.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar *vim-9.0* *vim-9* *version-9.0* *version9.0* diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index 83558850eb..eb9a04b6b4 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -1,7 +1,7 @@ -*vi_diff.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*vi_diff.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Differences between Vim and Vi *vi-differences* diff --git a/runtime/doc/vietnamese.txt b/runtime/doc/vietnamese.txt index acd2099bda..df6fbf8b53 100644 --- a/runtime/doc/vietnamese.txt +++ b/runtime/doc/vietnamese.txt @@ -1,7 +1,7 @@ -*vietnamese.txt* For Vim version 9.1. Last change: 2025 Aug 06 +*vietnamese.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Phạm Bình An + VIM REFERENCE MANUAL by Phạm Bình An Vietnamese language support in Vim *vietnamese* *Vietnamese* diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index e65d1fe501..4360c378ac 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,7 +1,7 @@ -*visual.txt* For Vim version 9.1. Last change: 2025 Oct 12 +*visual.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Visual mode *Visual* *Visual-mode* *visual-mode* diff --git a/runtime/doc/wayland.txt b/runtime/doc/wayland.txt index 9900d9ae35..7f1b4894ed 100644 --- a/runtime/doc/wayland.txt +++ b/runtime/doc/wayland.txt @@ -1,7 +1,7 @@ -*wayland.txt* For Vim version 9.1. Last change: 2025 Nov 01 +*wayland.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Wayland Protocol Support *wayland* diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 8dbc7f3ff7..9d1c03f297 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,7 +1,7 @@ -*windows.txt* For Vim version 9.1. Last change: 2025 Oct 26 +*windows.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Editing with multiple windows and buffers. *windows* *buffers* diff --git a/runtime/doc/workshop.txt b/runtime/doc/workshop.txt index 9ec30da950..25ea2ddbc6 100644 --- a/runtime/doc/workshop.txt +++ b/runtime/doc/workshop.txt @@ -1,7 +1,7 @@ -*workshop.txt* For Vim version 9.1. Last change: 2019 Jan 17 +*workshop.txt* For Vim version 9.1. Last change: 2025 Nov 09 - VIM REFERENCE MANUAL by Gordon Prieur + VIM REFERENCE MANUAL by Gordon Prieur Sun Visual WorkShop Features *workshop* *workshop-support* From aa9862a5b0e68581b07197f9c21b1441ab62a290 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 9 Nov 2025 19:39:22 +0000 Subject: [PATCH 32/54] patch 9.1.1901: tests: test_vim9_generics fails without job feature Problem: tests: test_vim9_generics fails when built without the job or channel feature (lazypingu) Solution: Skip test if job/channel feature is not available fixes: #18702 Signed-off-by: Christian Brabandt --- src/testdir/test_vim9_generics.vim | 8 ++++++-- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/testdir/test_vim9_generics.vim b/src/testdir/test_vim9_generics.vim index 07648a3326..48b31b043c 100644 --- a/src/testdir/test_vim9_generics.vim +++ b/src/testdir/test_vim9_generics.vim @@ -417,8 +417,12 @@ def Test_generic_func_typename() Fn>>([[0z10, 0z20], [0z30]], 'list>') Fn>((1, 'abc'), 'tuple') Fn>({a: 'a', b: 'b'}, 'dict') - Fn(test_null_job(), 'job') - Fn(test_null_channel(), 'channel') + if has('job') + Fn(test_null_job(), 'job') + endif + if has('channel') + Fn(test_null_channel(), 'channel') + endif Fn(function('Foo'), 'func(list, dict): list') END v9.CheckSourceSuccess(lines) diff --git a/src/version.c b/src/version.c index 78fb7bea17..df2c7f0508 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1901, /**/ 1900, /**/ From acf928a33bdd963c3e792de2b539374a57873425 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 10 Nov 2025 19:45:32 +0000 Subject: [PATCH 33/54] runtime(doc): Improve windows.txt formatting - Wrap some overlength lines - Highlight the example at :help WinScrolled-event closes: #18713 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/windows.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 9d1c03f297..bedaa32608 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 9.1. Last change: 2025 Nov 09 +*windows.txt* For Vim version 9.1. Last change: 2025 Nov 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -205,9 +205,9 @@ CTRL-W CTRL-N *CTRL-W_CTRL-N* :[N]new [++opt] [+cmd] *:new* Create a new window and start editing an empty file in it. Make new window N high (default is to use half the existing - height). Reduces the current window height to create room (and - others, if the 'equalalways' option is set and 'eadirection' - isn't "hor"). + height). Reduces the current window height to create room + (and others, if the 'equalalways' option is set and + 'eadirection' isn't "hor"). Also see |++opt| and |+cmd|. If 'fileformats' is not empty, the first format given will be used for the new buffer. If 'fileformats' is empty, the @@ -511,8 +511,8 @@ CTRL-W R Rotate windows upwards/leftwards. The second window becomes current window is in. CTRL-W x *CTRL-W_x* *CTRL-W_CTRL-X* -CTRL-W CTRL-X Without count: Exchange current window with next one. If there - is no next window, exchange with previous window. +CTRL-W CTRL-X Without count: Exchange current window with next one. If + there is no next window, exchange with previous window. With count: Exchange current window with Nth window (first window is 1). The cursor is put in the other window. When vertical and horizontal window splits are mixed, the @@ -659,11 +659,11 @@ times than |WinResized|, it may slow down editing a bit. The information provided by |WinScrolled| is a dictionary for each window that has changes, using the window ID as the key, and a total count of the changes -with the key "all". Example value for |v:event| (|Vim9| syntax): +with the key "all". Example value for |v:event| (|Vim9| syntax): > { - all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0}, + all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0}, 1003: {width: 0, height: -1, leftcol: 0, skipcol: 0, topline: 0, topfill: 0}, - 1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0}, + 1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0}, } Note that the "all" entry has the absolute values of the individual windows @@ -996,13 +996,13 @@ CTRL-W CTRL-Z *CTRL-W_CTRL-Z* *:pc* *:pclose* CTRL-W } *CTRL-W_}* Use identifier under cursor as a tag and perform a :ptag on - it. Make the new Preview window (if required) N high. If N is - not given, 'previewheight' is used. + it. Make the new Preview window (if required) N high. If N + is not given, 'previewheight' is used. CTRL-W g } *CTRL-W_g}* Use identifier under cursor as a tag and perform a :ptjump on - it. Make the new Preview window (if required) N high. If N is - not given, 'previewheight' is used. + it. Make the new Preview window (if required) N high. If N + is not given, 'previewheight' is used. *:pb* *:pbuffer* :[N]pb[uffer][!] [+cmd] [N] @@ -1325,8 +1325,8 @@ list of buffers. |unlisted-buffer| buffer (if there is one). Similarly, if you are in a normal (non-help) buffer, this takes you to the next normal buffer. This is so that if you have invoked help, it doesn't get in - the way when you're browsing code/text buffers. The next three - commands also work like this. + the way when you're browsing code/text buffers. The next + three commands also work like this. *:sbn* *:sbnext* :[N]sbn[ext] [+cmd] [N] From e1e347475eea179e6b0bb9a91d82221ad29edc23 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 10 Nov 2025 19:50:57 +0000 Subject: [PATCH 34/54] runtime(vim): Update base syntax, fix :augroup error matching Only terminate the :augroup END argument at whitespace, comments and trailing bars. closes: #18711 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/syntax/generator/vim.vim.base | 8 +++---- .../testdir/dumps/vim_ex_augroup_01.dump | 2 +- .../testdir/dumps/vim_ex_augroup_02.dump | 10 ++++----- .../testdir/dumps/vim_ex_augroup_03.dump | 22 +++++++++---------- .../testdir/dumps/vim_ex_augroup_04.dump | 20 +++++++++++++++++ .../syntax/testdir/input/vim_ex_augroup.vim | 17 ++++++++++---- runtime/syntax/vim.vim | 8 +++---- 7 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index dc523a2596..7aae3055b7 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 08 +" Last Change: 2025 Nov 10 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -397,13 +397,13 @@ syn cluster vimAugroupList contains=@vimCmdList,vimFilter,@vimFunc,vimLineCommen " define VimFolda syn region vimAugroup - \ start="\\ze\s\+\%([eE][nN][dD]\)\@!\S\+" + \ start="\\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S" \ matchgroup=vimAugroupKey - \ end="\\ze\s\+[eE][nN][dD]\>" + \ end="\\s\+[eE][nN][dD]\>" + syn match vimAugroupError "\ +0#0000000#ffffff0@72 | +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|!| +0#0000000&|f+0#0000001#ffff4012|o@1|"+0#0000e05#ffffff0|c|o|m@1|e|n|t| +0#0000000&@52 -| +0#0000e05#a8a8a8255@1>a+0#af5f00255#ffffff0|u|g|r|o|u|p|!| +0#0000000&|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49 +| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|!| +0#0000000&|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 | +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@59 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 | +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&@65 | +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@52 | +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@55 | +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 -|~+0#4040ff13&| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -| +0#0000000&@56|5@1|,|1| @9|B|o|t| +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |g|r|o|u|p|s| |n|a|m|e|d| |E|N|D|*| +0#0000000&@53 +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +@57|5@1|,|0|-|1| @7|9|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump b/runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump new file mode 100644 index 0000000000..4f7fc37771 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump @@ -0,0 +1,20 @@ +| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72 +|-+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&|e+0#0000001#ffff4012|n|d|i|n|g| +0#0000000#ffffff0@58 +||+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&|E|N|D| @61 +| +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@72 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|7|1|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_augroup.vim b/runtime/syntax/testdir/input/vim_ex_augroup.vim index f7022ecd88..3f43a7553e 100644 --- a/runtime/syntax/testdir/input/vim_ex_augroup.vim +++ b/runtime/syntax/testdir/input/vim_ex_augroup.vim @@ -41,14 +41,16 @@ augroup \"\| | autocmd! | augroup END augroup! \"\| +" trailing bar and tail comments + augroup foo"comment - au! - au BufRead * echo "Foo" + autocmd! + autocmd BufRead * echo "Foo" augroup END"comment augroup foo|echo "Foo" - au! - au BufRead * echo "Foo" + autocmd! + autocmd BufRead * echo "Foo" augroup END|echo "Foo" augroup! foo"comment @@ -56,7 +58,14 @@ augroup! foo|echo "Foo" " list groups + augroup augroup | echo "Foo" augroup " comment + +" groups named END* + +augroup ending +augroup END + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 3b6c80399c..5e1185a2b0 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 08 +" Last Change: 2025 Nov 10 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -451,13 +451,13 @@ syn cluster vimAugroupList contains=@vimCmdList,vimFilter,@vimFunc,vimLineCommen " define VimFolda syn region vimAugroup - \ start="\\ze\s\+\%([eE][nN][dD]\)\@!\S\+" + \ start="\\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S" \ matchgroup=vimAugroupKey - \ end="\\ze\s\+[eE][nN][dD]\>" + \ end="\\s\+[eE][nN][dD]\>" + syn match vimAugroupError "\ Date: Mon, 10 Nov 2025 19:58:31 +0000 Subject: [PATCH 35/54] patch 9.1.1902: GTK fails to compile with !FEAT_PROP_POPUP Problem: GTK fails to compile with !FEAT_PROP_POPUP Solution: Correct syntax under #ifdef (Drew Vogel) related: #18708 Signed-off-by: Drew Vogel Signed-off-by: Christian Brabandt --- src/drawline.c | 8 +++++--- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/drawline.c b/src/drawline.c index 7db64d0ee5..5ad45c6c3c 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -3107,11 +3107,13 @@ win_line( char_u *p = ptr - (mb_off + 1); chartabsize_T cts; - init_chartabsize_arg(&cts, wp, lnum, wlv.vcol + + colnr_T init_colnr = wlv.vcol; # ifdef FEAT_PROP_POPUP - - vcol_first_char, + init_colnr -= vcol_first_char; # endif - line, p); + init_chartabsize_arg(&cts, wp, lnum, init_colnr, line, p); + # ifdef FEAT_PROP_POPUP // do not want virtual text counted here cts.cts_has_prop_with_text = FALSE; diff --git a/src/version.c b/src/version.c index df2c7f0508..743af8af9a 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1902, /**/ 1901, /**/ From d32a26550b4f5cdd1c7c177969f56bf63cb5dcfd Mon Sep 17 00:00:00 2001 From: Drew Vogel Date: Mon, 10 Nov 2025 20:01:04 +0000 Subject: [PATCH 36/54] patch 9.1.1903: GTK naming still reflects GTK1 support Problem: GTK naming still reflects GTK1 support Solution: Rename to avoid confusion (Drew Vogel) related: #18708 Signed-off-by: Drew Vogel Signed-off-by: Christian Brabandt --- src/gui_gtk_x11.c | 10 +++++----- src/version.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 2b310ab3b6..4b586c9478 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -5185,7 +5185,7 @@ static PangoEngineShape *default_shape_engine = NULL; /* * Create a map from ASCII characters in the range [32,126] to glyphs - * of the current font. This is used by gui_gtk2_draw_string() to skip + * of the current font. This is used by gui_gtk_draw_string() to skip * the itemize and shaping process for the most common case. */ static void @@ -5900,7 +5900,7 @@ draw_under(int flags, int row, int col, int cells) } int -gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags) +gui_gtk_draw_string(int row, int col, char_u *s, int len, int flags) { char_u *conv_buf = NULL; // result of UTF-8 conversion char_u *new_conv_buf; @@ -6062,8 +6062,8 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags) backup_ch = *(cs + slen); *(cs + slen) = NUL; } - len_sum += gui_gtk2_draw_string_ext(row, col + len_sum, - cs, slen, flags, needs_pango); + len_sum += gui_gtk_draw_string_ext(row, col + len_sum, cs, slen, flags, + needs_pango); if (slen < len) *(cs + slen) = backup_ch; cs += slen; @@ -6075,7 +6075,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags) } int -gui_gtk2_draw_string_ext( +gui_gtk_draw_string_ext( int row, int col, char_u *s, diff --git a/src/version.c b/src/version.c index 743af8af9a..ec5a646aa5 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1903, /**/ 1902, /**/ From 1b92b278ba10816e625ac02e2c470157de365f21 Mon Sep 17 00:00:00 2001 From: Drew Vogel Date: Mon, 10 Nov 2025 20:04:37 +0000 Subject: [PATCH 37/54] patch 9.1.1904: Code still supports GTK2 versions older than 2.4 Problem: Code still supports GTK2 versions older than 2.4. Solution: Drop support for GTK2 < 2.4 (Drew Vogel) closes: #18708 Signed-off-by: Drew Vogel Signed-off-by: Christian Brabandt --- src/evalfunc.c | 2 +- src/gui.c | 4 +- src/gui_gtk.c | 83 +-------------------------------------- src/gui_gtk_x11.c | 2 +- src/proto/gui_gtk_x11.pro | 4 +- src/version.c | 2 + src/vim.h | 6 --- 7 files changed, 9 insertions(+), 94 deletions(-) diff --git a/src/evalfunc.c b/src/evalfunc.c index 7c3139edc5..e770321eaf 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -6831,7 +6831,7 @@ f_has(typval_T *argvars, typval_T *rettv) {"builtin_terms", 1}, {"all_builtin_terms", 1}, {"browsefilter", -#if defined(FEAT_BROWSE) && (defined(USE_FILE_CHOOSER) \ +#if defined(FEAT_BROWSE) && (defined(FEAT_GUI_GTK) \ || defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_MOTIF)) 1 diff --git a/src/gui.c b/src/gui.c index 8c37d8740e..401f8ef837 100644 --- a/src/gui.c +++ b/src/gui.c @@ -1081,7 +1081,7 @@ gui_get_wide_font(void) #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MSWIN) /* * Set list of ascii characters that combined can create ligature. - * Store them in char map for quick access from gui_gtk2_draw_string. + * Store them in char map for quick access from gui_gtk_draw_string. */ void gui_set_ligatures(void) @@ -2533,7 +2533,7 @@ gui_outstr_nowrap( */ #ifdef FEAT_GUI_GTK // The value returned is the length in display cells - len = gui_gtk2_draw_string(gui.row, col, s, len, draw_flags); + len = gui_gtk_draw_string(gui.row, col, s, len, draw_flags); #else if (enc_utf8) { diff --git a/src/gui_gtk.c b/src/gui_gtk.c index 593215306f..305e761a5c 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -1190,47 +1190,6 @@ gui_mch_destroy_scrollbar(scrollbar_T *sb) * Implementation of the file selector related stuff */ -#ifndef USE_FILE_CHOOSER - static void -browse_ok_cb(GtkWidget *widget UNUSED, gpointer cbdata) -{ - gui_T *vw = (gui_T *)cbdata; - - if (vw->browse_fname != NULL) - g_free(vw->browse_fname); - - vw->browse_fname = (char_u *)g_strdup(gtk_file_selection_get_filename( - GTK_FILE_SELECTION(vw->filedlg))); - gtk_widget_hide(vw->filedlg); -} - - static void -browse_cancel_cb(GtkWidget *widget UNUSED, gpointer cbdata) -{ - gui_T *vw = (gui_T *)cbdata; - - if (vw->browse_fname != NULL) - { - g_free(vw->browse_fname); - vw->browse_fname = NULL; - } - gtk_widget_hide(vw->filedlg); -} - - static gboolean -browse_destroy_cb(GtkWidget *widget UNUSED) -{ - if (gui.browse_fname != NULL) - { - g_free(gui.browse_fname); - gui.browse_fname = NULL; - } - gui.filedlg = NULL; - gtk_main_quit(); - return FALSE; -} -#endif - /* * Put up a file requester. * Returns the selected name in allocated memory, or NULL for Cancel. @@ -1249,13 +1208,11 @@ gui_mch_browse(int saving, char_u *initdir, char_u *filter) { -#ifdef USE_FILE_CHOOSER # if GTK_CHECK_VERSION(3,20,0) GtkFileChooserNative *fc; # else GtkWidget *fc; # endif -#endif char_u dirbuf[MAXPATHL]; guint log_handler; const gchar *domain = "Gtk"; @@ -1278,7 +1235,6 @@ gui_mch_browse(int saving, log_handler = g_log_set_handler(domain, G_LOG_LEVEL_WARNING, recent_func_log_func, NULL); -#ifdef USE_FILE_CHOOSER // We create the dialog each time, so that the button text can be "Open" // or "Save" according to the action. # if GTK_CHECK_VERSION(3,20,0) @@ -1352,7 +1308,7 @@ gui_mch_browse(int saving, if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(fc)) == GTK_RESPONSE_ACCEPT) # else if (gtk_dialog_run(GTK_DIALOG(fc)) == GTK_RESPONSE_ACCEPT) -#endif +# endif { char *filename; @@ -1366,43 +1322,6 @@ gui_mch_browse(int saving, gtk_widget_destroy(GTK_WIDGET(fc)); # endif -#else // !USE_FILE_CHOOSER - - if (gui.filedlg == NULL) - { - GtkFileSelection *fs; // shortcut - - gui.filedlg = gtk_file_selection_new((const gchar *)title); - gtk_window_set_modal(GTK_WINDOW(gui.filedlg), TRUE); - gtk_window_set_transient_for(GTK_WINDOW(gui.filedlg), - GTK_WINDOW(gui.mainwin)); - fs = GTK_FILE_SELECTION(gui.filedlg); - - gtk_container_border_width(GTK_CONTAINER(fs), 4); - - gtk_signal_connect(GTK_OBJECT(fs->ok_button), - "clicked", GTK_SIGNAL_FUNC(browse_ok_cb), &gui); - gtk_signal_connect(GTK_OBJECT(fs->cancel_button), - "clicked", GTK_SIGNAL_FUNC(browse_cancel_cb), &gui); - // gtk_signal_connect() doesn't work for destroy, it causes a hang - gtk_signal_connect_object(GTK_OBJECT(gui.filedlg), - "destroy", GTK_SIGNAL_FUNC(browse_destroy_cb), - GTK_OBJECT(gui.filedlg)); - } - else - gtk_window_set_title(GTK_WINDOW(gui.filedlg), (const gchar *)title); - - // Concatenate "initdir" and "dflt". - if (dflt != NULL && *dflt != NUL - && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL) - STRCAT(dirbuf, dflt); - - gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg), - (const gchar *)dirbuf); - - gtk_widget_show(gui.filedlg); - gtk_main(); -#endif // !USE_FILE_CHOOSER g_log_remove_handler(domain, log_handler); CONVERT_TO_UTF8_FREE(title); diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 4b586c9478..e588c935d4 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -6063,7 +6063,7 @@ gui_gtk_draw_string(int row, int col, char_u *s, int len, int flags) *(cs + slen) = NUL; } len_sum += gui_gtk_draw_string_ext(row, col + len_sum, cs, slen, flags, - needs_pango); + needs_pango); if (slen < len) *(cs + slen) = backup_ch; cs += slen; diff --git a/src/proto/gui_gtk_x11.pro b/src/proto/gui_gtk_x11.pro index 37ae5ec5a6..5a57240135 100644 --- a/src/proto/gui_gtk_x11.pro +++ b/src/proto/gui_gtk_x11.pro @@ -45,8 +45,8 @@ guicolor_T gui_mch_get_rgb_color(int r, int g, int b); void gui_mch_set_fg_color(guicolor_T color); void gui_mch_set_bg_color(guicolor_T color); void gui_mch_set_sp_color(guicolor_T color); -int gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags); -int gui_gtk2_draw_string_ext(int row, int col, char_u *s, int len, int flags, int force_pango); +int gui_gtk_draw_string(int row, int col, char_u *s, int len, int flags); +int gui_gtk_draw_string_ext(int row, int col, char_u *s, int len, int flags, int force_pango); int gui_mch_haskey(char_u *name); int gui_get_x11_windis(Window *win, Display **dis); Display *gui_mch_get_display(void); diff --git a/src/version.c b/src/version.c index ec5a646aa5..2acdf2a23f 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1904, /**/ 1903, /**/ diff --git a/src/vim.h b/src/vim.h index 1ca6112e63..58823ec786 100644 --- a/src/vim.h +++ b/src/vim.h @@ -2678,12 +2678,6 @@ typedef int (*opt_expand_cb_T)(optexpand_T *args, int *numMatches, char_u ***mat # endif #endif -#if defined(FEAT_BROWSE) && defined(GTK_CHECK_VERSION) -# if GTK_CHECK_VERSION(2,4,0) -# define USE_FILE_CHOOSER -# endif -#endif - #ifdef FEAT_GUI_GTK # if !GTK_CHECK_VERSION(2,14,0) # define gtk_widget_get_window(wid) ((wid)->window) From d3bef6cf3f1364194c7855e0f34d636bc635c775 Mon Sep 17 00:00:00 2001 From: tocariimaa Date: Mon, 10 Nov 2025 20:13:35 +0000 Subject: [PATCH 38/54] runtime(sml): Fix number regex in syntax script closes: #18690 Signed-off-by: tocariimaa Signed-off-by: Christian Brabandt --- runtime/syntax/sml.vim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/runtime/syntax/sml.vim b/runtime/syntax/sml.vim index 8f1af3f9bd..288b2f8c79 100644 --- a/runtime/syntax/sml.vim +++ b/runtime/syntax/sml.vim @@ -2,9 +2,9 @@ " Language: SML " Filenames: *.sml *.sig " Maintainer: Markus Mottl -" Previous Maintainer: Fabrizio Zeno Cornelli -" (invalid) -" Last Change: 2022 Apr 01 +" Previous Maintainer: Fabrizio Zeno Cornelli (invalid) +" Last Change: 2025 Nov 07 - Update Number Regex +" 2022 Apr 01 " 2015 Aug 31 - Fixed opening of modules (Ramana Kumar) " 2006 Oct 23 - Fixed character highlighting bug (MM) @@ -152,9 +152,11 @@ syn match smlKeyChar ";" syn match smlKeyChar "\*" syn match smlKeyChar "=" -syn match smlNumber "\<-\=\d\+\>" -syn match smlNumber "\<-\=0[x|X]\x\+\>" -syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>" +syn match smlNumber "\~\=\<\d\+\>" +syn match smlNumber "\~\=\<0x\x\+\>" +syn match smlWord "\<0w\d\+\>" +syn match smlWord "\<0wx\x\+\>" +syn match smlReal "\~\=\<\d\+\.\d\+\%([eE]\~\=\d\+\)\=\>" " Synchronization syn sync minlines=20 @@ -208,6 +210,7 @@ hi def link smlOperator Keyword hi def link smlBoolean Boolean hi def link smlCharacter Character hi def link smlNumber Number +hi def link smlWord Number hi def link smlReal Float hi def link smlString String hi def link smlType Type From 54cc8201291e6f8860084ce7e7cd5b8069344612 Mon Sep 17 00:00:00 2001 From: Peter Kenny Date: Mon, 10 Nov 2025 20:29:08 +0000 Subject: [PATCH 39/54] runtime(doc): Update Section 4 of vim9.txt closes: #18610 Signed-off-by: Peter Kenny Signed-off-by: Christian Brabandt --- runtime/doc/tags | 9 + runtime/doc/vim9.txt | 1176 +++++++++++++++++++++++++++---------- runtime/doc/vim9class.txt | 4 +- 3 files changed, 882 insertions(+), 307 deletions(-) diff --git a/runtime/doc/tags b/runtime/doc/tags index 8fd8cbae16..6feb92b2ae 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -8696,6 +8696,7 @@ instanceof() builtin.txt /*instanceof()* intel-itanium syntax.txt /*intel-itanium* intellimouse-wheel-problems gui_w32.txt /*intellimouse-wheel-problems* interactive-functions usr_41.txt /*interactive-functions* +interface vim9class.txt /*interface* interfaces-5.2 version5.txt /*interfaces-5.2* internal-error message.txt /*internal-error* internal-variables eval.txt /*internal-variables* @@ -11595,6 +11596,7 @@ vim9-access-modes vim9class.txt /*vim9-access-modes* vim9-autoload vim9.txt /*vim9-autoload* vim9-boolean vim9.txt /*vim9-boolean* vim9-class vim9class.txt /*vim9-class* +vim9-class-type vim9.txt /*vim9-class-type* vim9-classes vim9.txt /*vim9-classes* vim9-const vim9.txt /*vim9-const* vim9-curly vim9.txt /*vim9-curly* @@ -11602,14 +11604,18 @@ vim9-debug repeat.txt /*vim9-debug* vim9-declaration vim9.txt /*vim9-declaration* vim9-declarations usr_41.txt /*vim9-declarations* vim9-differences vim9.txt /*vim9-differences* +vim9-enum-type vim9.txt /*vim9-enum-type* +vim9-enumvalue-type vim9.txt /*vim9-enumvalue-type* vim9-export vim9.txt /*vim9-export* vim9-false-true vim9.txt /*vim9-false-true* vim9-final vim9.txt /*vim9-final* vim9-func-declaration vim9.txt /*vim9-func-declaration* +vim9-func-type vim9.txt /*vim9-func-type* vim9-function-defined-later vim9.txt /*vim9-function-defined-later* vim9-gotchas vim9.txt /*vim9-gotchas* vim9-ignored-argument vim9.txt /*vim9-ignored-argument* vim9-import vim9.txt /*vim9-import* +vim9-interface-type vim9.txt /*vim9-interface-type* vim9-lambda vim9.txt /*vim9-lambda* vim9-lambda-arguments vim9.txt /*vim9-lambda-arguments* vim9-line-continuation vim9.txt /*vim9-line-continuation* @@ -11618,11 +11624,14 @@ vim9-mix vim9.txt /*vim9-mix* vim9-namespace vim9.txt /*vim9-namespace* vim9-no-dict-function vim9.txt /*vim9-no-dict-function* vim9-no-shorten vim9.txt /*vim9-no-shorten* +vim9-object-type vim9.txt /*vim9-object-type* +vim9-partial-declaration vim9.txt /*vim9-partial-declaration* vim9-rationale vim9.txt /*vim9-rationale* vim9-reload vim9.txt /*vim9-reload* vim9-s-namespace vim9.txt /*vim9-s-namespace* vim9-scopes vim9.txt /*vim9-scopes* vim9-string-index vim9.txt /*vim9-string-index* +vim9-typealias-type vim9.txt /*vim9-typealias-type* vim9-types vim9.txt /*vim9-types* vim9-unpack-ignore vim9.txt /*vim9-unpack-ignore* vim9-user-command vim9.txt /*vim9-user-command* diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 7941b83abf..6e65ca064c 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.1. Last change: 2025 Oct 06 +*vim9.txt* For Vim version 9.1. Last change: 2025 Nov 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -24,11 +24,12 @@ features in Vim9 script. ------------------------------------------------------------------------------ NOTE: In this vim9.txt help file, the Vim9 script code blocks beginning - with `vim9script` are Vim9 script syntax highlighted. Also, they are - sourceable, meaning you can run them to see what they output. To - source them, use `:'<,'>source` (see |:source-range|), which is done - by visually selecting the line(s) with |V| and typing `:so`. - For example, try it on the following Vim9 script: >vim9 + with `vim9script` (and individual lines starting with `vim9cmd`) are + Vim9 script syntax highlighted. Also, they are sourceable, meaning + you can run them to see what they output. To source them, use + `:'<,'>source` (see |:source-range|), which is done by visually + selecting the line(s) with |V| and typing `:so`. For example, try it + on the following Vim9 script: >vim9 vim9script echowindow "Welcome to Vim9 script!" @@ -1478,38 +1479,72 @@ without arguments. Example: > ============================================================================== 4. Types *vim9-types* - *E1008* *E1009* *E1010* *E1012* - *E1013* *E1029* *E1030* -The following builtin types are supported: - bool - number - float - string - blob - list<{type}> - dict<{type}> - object<{type}> - job - channel - tuple<{type}> - tuple<{type}, {type}, ...> - tuple<...list<{type}>> - tuple<{type}, ...list<{type}>> - func - func: {type} - func({type}, ...) - func({type}, ...): {type} + +The following types, each shown with its corresponding internal |v:t_TYPE| +variable, are supported: + + number |v:t_number| + string |v:t_string| + func |v:t_func| + func: {type} |v:t_func| + func({type}, ...) |v:t_func| + func({type}, ...): {type} |v:t_func| + list<{type}> |v:t_list| + dict<{type}> |v:t_dict| + float |v:t_float| + bool |v:t_bool| + none |v:t_none| + job |v:t_job| + channel |v:t_channel| + blob |v:t_blob| + class |v:t_class| + object |v:t_object| + typealias |v:t_typealias| + enum |v:t_enum| + enumvalue |v:t_enumvalue| + tuple<{type}> |v:t_tuple| + tuple<{type}, {type}, ...> |v:t_tuple| + tuple<...list<{type}>> |v:t_tuple| + tuple<{type}, ...list<{type}>> |v:t_tuple| void -These types can be used in declarations, but no simple value will actually -have the "void" type. Trying to use a void (e.g. a function without a -return value) results in error *E1031* *E1186* . + *E1031* *E1186* +These types can be used in declarations, though no simple value can have the +"void" type. Trying to use a void as a value results in an error. Examples: >vim9 -There is no array type, use list<{type}> instead. For a list constant an -efficient implementation is used that avoids allocating a lot of small pieces -of memory. + vim9script + def NoReturnValue(): void + enddef + try + const X: any = NoReturnValue() + catch + echo v:exception # E1031: Cannot use void value + try + echo NoReturnValue() + catch + echo v:exception # E1186: Expression does not result in a ... + endtry + endtry +< *E1008* *E1009* *E1010* *E1012* +Ill-formed declarations and mismatching types result in errors. The following +are examples of errors E1008, E1009, E1010, and E1012: >vim9 + + vim9cmd var l: list + vim9cmd var l: list + vim9cmd var l: list = ['42'] +< +There is no array type. Instead, use either a list or a tuple. Those types +may also be literals (constants). In the following example, [5, 6] is a list +literal and (7, ) a tuple literal. The echoed list is a list literal too: >vim9 + + vim9script + var l: list = [1, 2] + var t: tuple<...list> = (3, 4) + echo [l, t, [5, 6], (7, )] +< *tuple-type* -A tuple type can be declared in more or less specific ways: +A tuple type may be declared in the following ways: tuple a tuple with a single item of type |Number| tuple a tuple with two items of type |Number| and |String| @@ -1535,7 +1570,9 @@ variadic tuple must end with a list type. Examples: > var myTuple: tuple<...list> = () < *vim9-func-declaration* *E1005* *E1007* -A partial and function can be declared in more or less specific ways: + *vim9-partial-declaration* + *vim9-func-type* +A function (or partial) may be declared in the following ways: func any kind of function reference, no type checking for arguments or return value func: void any number and type of arguments, no return @@ -1567,352 +1604,881 @@ If the return type is "void" the function does not return a value. The reference can also be a |Partial|, in which case it stores extra arguments and/or a dictionary, which are not visible to the caller. Since they are -called in the same way the declaration is the same. +called in the same way, the declaration is the same. This interactive example +prompts for a circle's radius and returns its area to two decimal places, +using a partial: >vim9 -Custom types can be defined with `:type`: > - :type MyList list -Custom types must start with a capital letter, to avoid name clashes with -builtin types added later, similarly to user functions. + vim9script + def CircleArea(pi: float, radius: float): float + return pi * radius->pow(2) + enddef + const AREA: func(float): float = CircleArea->function([3.14]) + const RADIUS: float = "Enter a radius value: "->input()->str2float() + echo $"\nThe area of a circle with a radius of {RADIUS} is " .. + $"{AREA(RADIUS)} (Ï€ to two d.p.)" +< + *vim9-typealias-type* +Custom types (|typealias|) can be defined with `:type`. They must start with +a capital letter (which avoids name clashes with either current or future +builtin types) similar to user functions. This example creates a list of +perfect squares and reports on |type()| (14, a typealias) and the |typename()|: >vim9 -And classes and interfaces can be used as types: > - :class MyClass - :var mine: MyClass + vim9script + type Ln = list + final perfect_squares: Ln = [1, 4, 9, 16, 25] + echo "Typename (Ln): " .. + $"type() is {Ln->type()} and typename() is {Ln->typename()}" +< + *E1105* +A typealias itself cannot be converted to a string: >vim9 - :interface MyInterface - :var mine: MyInterface + vim9script + type Ln = list + const FAILS: func = (): string => { + echo $"{Ln}" # E1105: Cannot convert typealias to string + } +< + *vim9-class-type* *vim9-interface-type* + *vim9-object-type* +A |class|, |object|, and |interface| may all be used as types. The following +interactive example prompts for a float value and returns the area of two +different shapes. It also reports on the |type()| and |typename()| of the +classes, objects, and interface: >vim9 - :class MyTemplate - :var mine: MyTemplate - :var mine: MyTemplate - - :class MyInterface - :var mine: MyInterface - :var mine: MyInterface -{not implemented yet} + vim9script + interface Shape + def InfoArea(): tuple + endinterface + class Circle implements Shape + var radius: float + def InfoArea(): tuple + return ('Circle (Ï€ × r²)', 3.141593 * this.radius->pow(2)) + enddef + endclass + class Square implements Shape + var side: float + def InfoArea(): tuple + return ('Square (s²)', this.side->pow(2)) + enddef + endclass + const INPUT: float = "Enter a float value: "->input()->str2float() + echo "\nAreas of shapes:" + var myCircle: object = Circle.new(INPUT) + var mySquare: object = Square.new(INPUT) + final shapes: list = [myCircle, mySquare] + for shape in shapes + const [N: string, A: float] = shape.InfoArea() + echo $"\t- {N} has area of {A}" + endfor + echo "\n\t\ttype()\ttypename()\n\t\t------\t----------" + echo $"Circle\t\t{Circle->type()}\t{Circle->typename()}" + echo $"Square\t\t{Square->type()}\t{Square->typename()}" + echo $"Shape\t\t{Shape->type()}\t{Shape->typename()}" + echo $"MyCircle\t{myCircle->type()}\t{myCircle->typename()}" + echo $"MySquare\t{mySquare->type()}\t{mySquare->typename()}" + echo $"shapes\t\t{shapes->type()}\t{shapes->typename()}" +< + *vim9-enum-type* *vim9-enumvalue-type* +An |enum| may be used as a type (|v:t_enum|). Variables holding enum values +have the enumvalue type (|v:t_enumvalue|) at runtime. The following +interactive example prompts for a character and returns information about +either a square or a rhombus. It also reports on the |type()| and |typename()| +of the enum and enumvalue: >vim9 + vim9script + enum Quad + Square('four', 'only'), + Rhombus('opposite', 'no') + var eq: string + var ra: string + def string(): string + return $"\nA {this.name} has " .. + $"{this.eq} equal sides and {this.ra} right angles\n\n" + enddef + endenum + echo "Rhombus (r) or Square (s)?" + var myQuad: Quad = getcharstr() =~ '\c^R' ? Quad.Rhombus : Quad.Square + echo myQuad.string() .. "\ttype()\ttypename()" + echo $"Quad \t{Quad->type()} \t{Quad->typename()}" + echo $"myQuad\t{myQuad->type()}\t{myQuad->typename()}" +< + Notes: This script uses builtin method "string()" (|object-string()|). + The typename() of Quad and myQuad are the same ("enum") + whereas the type() is distinguished (myQuad returns 16, + enumvalue, whereas Quad returns 15, enum). Variable types and type casting ~ *variable-types* Variables declared in Vim9 script or in a `:def` function have a type, either specified explicitly or inferred from the initialization. -Global, buffer, window and tab page variables do not have a specific type, the -value can be changed at any time, possibly changing the type. Therefore, in -compiled code the "any" type is assumed. +Global, buffer, window and tab page variables do not have a specific type. +Consequently, their values may change at any time, possibly changing the type. +Therefore, in compiled code, the "any" type is assumed. -This can be a problem when the "any" type is undesired and the actual type is -expected to always be the same. For example, when declaring a list: > - var l: list = [1, g:two] -At compile time Vim doesn't know the type of "g:two" and the expression type -becomes list. An instruction is generated to check the list type before -doing the assignment, which is a bit inefficient. - *type-casting* *E1104* -To avoid this, use a type cast: > - var l: list = [1, g:two] -The compiled code will then only check that "g:two" is a number and give an -error if it isn't. This is called type casting. +This can be a problem when stricter typing is desired, for example, when +declaring a list: > + var l: list = [1, b:two] +Since Vim doesn't know the type of "b:two", the expression becomes list. +A runtime check verifies the list matches the declared type before assignment. -The syntax of a type cast is: "<" {type} ">". There cannot be white space -after the "<" or before the ">" (to avoid them being confused with -smaller-than and bigger-than operators). + *type-casting* +To get more specific type checking, use type casting. This checks the +variable's type before building the list, rather than checking whether +list items match the declared type. For example: > + var l: list = [1, b:two] +< +So, here the type cast checks whether "b:two" is a number and gives an error +if it isn't. -The semantics is that, if needed, a runtime type check is performed. The -value is not actually changed. If you need to change the type, e.g. to change -it to a string, use the |string()| function. Or use |str2nr()| to convert a +The difference is demonstrated in the following example. With funcref +variable "NTC", Vim infers the expression type "[1, b:two]" as list, then +verifies whether it can be assigned to the list return type. With +funcref variable "TC", the type cast means Vim first checks whether "b:two" is +a type: >vim9 + + vim9script + b:two = '2' + const NTC: func = (): list => { + return [1, b:two] + } + disassemble NTC # 3 CHECKTYPE list stack [-1] + try + NTC() + catch + echo v:exception .. "\n\n" # expected list but... + endtry + const TC: func = (): list => { + return [1, b:two] + } + disassemble TC # 2 CHECKTYPE number stack [-1] + try + TC() + catch + echo v:exception # expected number but got string + endtry +< + Note: Notice how the error messages differ, showing when + type checking occurs. + + *E1104* +The syntax of a type cast is "<{type}>". An error occurs if either the +opening "<" (|E121|) or closing ">" (E1104) is omitted. Also, white space +is not allowed either after the "<" (|E15|) or before the ">" (|E1068|), which +avoids ambiguity with smaller-than and greater-than operators. + +Although a type casting forces explicit type checking, it neither changes the +value of, nor the type of, a variable. If you need to alter the type, use a +function such as |string()| to convert to a string, or |str2nr()| to convert a string to a number. -If a type is given where it is not expected you can get *E1272* . +If type casting is applied to a chained expression, it must be compatible with +the final result. Examples: >vim9 -If a type is incomplete you get *E1363* , e.g. when you have an object for -which the class is not known (usually that is a null object). + vim9script + # These type casts work + echo >[3, 2, 1]->extend(['Go!']) + echo [3, 2, 1]->extend(['Go!'])->string() + echo >>[3, 2, 1]->list2tuple() + # This type cast fails + echo [3, 2, 1]->extend(['Go!'])->string() +< + *E1272* +If a type is used in a context where types are not expected you can get +E1272. For example: > + :vim9cmd echo islocked('x: string') +< Note: This must be executed from Vim's command line, not sourced. + + *E1363* +If a type is incomplete, such as when an object's class is unknown, E1363 +results. For example: >vim9 + + vim9script + var E1363 = null_class.member # E1363: Incomplete type +< +Another null object-related error is |E1360|: >vim9 + + vim9script + var obj = null_object + var E1360 = obj.MyMethod() # E1360: Using a null object +< Type inference ~ *type-inference* -In general: Whenever the type is clear it can be omitted. For example, when -declaring a variable and giving it a value: > - var name = 0 # infers number type - var name = 'hello' # infers string type +Declaring types explicitly provides many benefits, including targeted type +checking and clearer error messages. Nonetheless, Vim often can infer types +automatically when they are omitted. For example, each of these variables' +types are inferred, with the |type()| and |typename()| echoed showing those +inferred types: >vim9 -The type of a list and dictionary comes from the common type of the values. -If the values all have the same type, that type is used for the list or -dictionary. If there is a mix of types, the "any" type is used. > - [1, 2, 3] list - ['a', 'b', 'c'] list - [1, 'x', 3] list + vim9script + echo "\t type()\t typename()" + var b = true | echo $"{b} \t {b->type()} \t {b->typename()}" + var f = 4.2 | echo $"{f} \t {f->type()} \t {f->typename()}" + var l = [1, 2] | echo $"{l} \t {l->type()} \t {l->typename()}" + var n = 42 | echo $"{n} \t {n->type()} \t {n->typename()}" + var s = 'yes' | echo $"{s} \t {s->type()} \t {s->typename()}" + var t = (42, ) | echo $"{t} \t {t->type()} \t {t->typename()}" +< +The type of a list, tuple, or dictionary is inferred from the common type of +its values. When the values are all the same type, that type is used. +If there is a mix of types, the "any" type is used. In the following example, +the echoed |typename()| for each literal demonstrates these points: >vim9 -The common type of function references, if they do not all have the same -number of arguments, uses "(...)" to indicate the number of arguments is not -specified. For example: > - def Foo(x: bool) + vim9script + echo [1, 2]->typename() # list + echo [1, 'x']->typename() # list + echo {ints: [1, 2], bools: [false]}->typename() # dict> + echo (true, false)->typename() # tuple +< +The common type of function references, when they do not all have the same +number of arguments, is indicated with "(...)", meaning the number of +arguments is unequal. This script demonstrates a "list": >vim9 + + vim9script + def Foo(x: bool): void enddef - def Bar(x: bool, y: bool) + def Bar(x: bool, y: bool): void enddef var funclist = [Foo, Bar] echo funclist->typename() -Results in: - list +< +Script-local variables in a Vim9 script are type checked. The type is +also checked for variables declared in a legacy function. For example: >vim9 -For script-local variables in Vim9 script the type is checked, also when the -variable was declared in a legacy function. + vim9script + var my_local = (1, 2) + function Legacy() + let b:legacy = [1, 2] + endfunction + Legacy() + echo $"{my_local} is type {my_local->type()} ({my_local->typename()})" + echo $"{b:legacy} is type {b:legacy->type()} ({b:legacy->typename()})" +< + *E1013* +When a type is declared for a List, Tuple, or Dictionary, the type is attached +to it. Similarly, if a type is not declared, the type Vim infers is attached. +In either case, if an expression attempts to change the type, E1013 results. +This example has its type inferred and demonstrates E1013: >vim9 -When a type has been declared this is attached to a List or Dictionary. When -later some expression attempts to change the type an error will be given: > - var ll: list = [1, 2, 3] - ll->extend(['x']) # Error, 'x' is not a number + vim9script + var lb = [true, true] # Two bools, so Vim infers list type + echo lb->typename() # Echoes list + lb->extend([0]) # E1013 Argument 2: type mismatch, ... +< +If you want a permissive list, either explicitly use or declare an +empty list initially (or both, i.e., `list = []`). Examples: >vim9 -If the type is not declared then it is allowed to change: > - [1, 2, 3]->extend(['x']) # result: [1, 2, 3, 'x'] + vim9script + final la: list = [] + echo la->extend(['two', 1]) + final le = [] + echo le->extend(la) +< +Similarly for a permissive dictionary: >vim9 -For a variable declaration an inferred type matters: > - var ll = [1, 2, 3] - ll->extend(['x']) # Error, 'x' is not a number -That is because the declaration looks like a list of numbers, thus is -equivalent to: > - var ll: list = [1, 2, 3] -If you do want a more permissive list you need to declare the type: > - var ll: list = [1, 2, 3] - ll->extend(['x']) # OK + vim9script + final da: dict = {} + echo da->extend({2: 2, 1: 'One'}) + final de = {} + echo de->extend(da)->string() +< +And, although tuples themselves are immutable, permissive tuple concatenation +can be achieved with either "any" or an empty tuple: >vim9 + vim9script + var t_any: tuple<...list> = (3, '2') + t_any = t_any + (true, ) + echo t_any + var t_dec_empty = () + t_dec_empty = t_dec_empty + (3, '2', true) + echo t_dec_empty +< +If a list literal or dictionary literal is not bound to a variable, its type +may change, as this example shows: >vim9 + + vim9script + echo [3, 2, 1]->typename() # list + echo [3, 2, 1]->extend(['Zero'])->typename() # list + echo {1: ['One']}->typename() # dict> + echo {1: ['One']}->extend({2: [2]})->typename() # dict> +< Stricter type checking ~ - *type-checking* + *type-checking* In legacy Vim script, where a number was expected, a string would be automatically converted to a number. This was convenient for an actual number such as "123", but leads to unexpected problems (and no error message) if the string doesn't start with a number. Quite often this leads to hard-to-find -bugs. e.g.: > +bugs. For example, in legacy Vim script this echoes "1": >vim + echo 123 == '123' -< 1 ~ -With an accidental space: > - echo 123 == ' 123' -< 0 ~ - *E1206* *E1210* *E1212* -In Vim9 script this has been made stricter. In most places it works just as -before if the value used matches the expected type. There will sometimes be -an error, thus breaking backwards compatibility. For example: -- Using a number other than 0 or 1 where a boolean is expected. *E1023* -- Using a string value when setting a number option. -- Using a number where a string is expected. *E1024* *E1105* - -One consequence is that the item type of a list or dict given to |map()| must -not change, if the type was declared. This will give an error in Vim9 -script: > - var mylist: list = [1, 2, 3] - echo map(mylist, (i, v) => 'item ' .. i) -< E1012: Type mismatch; expected number but got string in map() ~ - -Instead use |mapnew()|, it creates a new list: > - var mylist: list = [1, 2, 3] - echo mapnew(mylist, (i, v) => 'item ' .. i) -< ['item 0', 'item 1', 'item 2'] ~ - -If the item type was not declared or determined to be "any" it can change to a -more specific type. E.g. when a list of mixed types gets changed to a list of -strings: > - var mylist = [1, 2.0, '3'] - # typename(mylist) == "list" - map(mylist, (i, v) => 'item ' .. i) - # typename(mylist) == "list", no error - -There is a subtle difference between using a list constant directly and -through a variable declaration. Because of type inference, when using a list -constant to initialize a variable, this also sets the declared type: > - var mylist = [1, 2, 3] - # typename(mylist) == "list" - echo map(mylist, (i, v) => 'item ' .. i) # Error! - -When using the list constant directly, the type is not declared and is allowed -to change: > - echo map([1, 2, 3], (i, v) => 'item ' .. i) # OK - -The reasoning behind this is that when a type is declared and the list is -passed around and changed, the declaration must always hold. So that you can -rely on the type to match the declared type. For a constant this is not -needed. - - *E1158* -Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use -|flattennew()| instead. Since |flatten()| is intended to always change the -type, it can not be used in Vim9 script. - -Assigning to a funcref with specified arguments (see |vim9-func-declaration|) -does strict type checking of the arguments. For variable number of arguments -the type must match: > - var FuncRef: func(string, number, bool): number - FuncRef = (v1: string, v2: number, v3: bool) => 777 # OK - FuncRef = (v1: string, v2: number, v3: number) => 777 # Error! - # variable number of arguments must have same type - var FuncVA: func(...list): number - FuncVA = (...v: list): number => v # Error! - FuncVA = (...v: list): number => v # OK, `any` runtime check - FuncVA = (v1: string, v: string2): number => 333 # Error! - FuncVA = (v: list): number => 3 # Error! - -If the destination funcref has no specified arguments, then there is no -argument type checking: > - var FuncUnknownArgs: func: number - FuncUnknownArgs = (v): number => v # OK - FuncUnknownArgs = (v1: string, v2: string): number => 3 # OK - FuncUnknownArgs = (...v1: list): number => 333 # OK < - *E1211* *E1217* *E1218* *E1219* *E1220* *E1221* - *E1222* *E1223* *E1224* *E1225* *E1226* *E1227* - *E1228* *E1235* *E1238* *E1250* *E1251* *E1252* - *E1253* *E1256* *E1297* *E1298* *E1301* *E1528* - *E1529* *E1530* *E1531* *E1534* +However, if an unintended space is included, "0" is echoed: >vim + + echo 123 == ' 123' +< + *E1206* +In Vim9 script this has been made stricter. In most places it works just as +before if the value used matches the expected type. For example, in both +legacy Vim script and Vim9 script trying to use anything other than a +dictionary when it is required: >vim + + echo [8, 9]->keys() + vim9cmd echo [8, 9]->keys() # E1206: Dictionary required +< + *E1023* *E1024* *E1029* + *E1030* *E1210* *E1212* +However, sometimes there will be an error in Vim9 script, which breaks +backwards compatibility. The following examples illustrate various places +this happens. The legacy Vim script behavior, which does not fail, is shown +first. It is followed by the error that occurs if the same command is used +in Vim9 script. + + - Using a number (except 0 or 1) where a bool is expected: >vim + + echo v:version ? v:true : v:false + vim9cmd echo v:version ? true : false # E1023: Using a Number as a... +< + - Using a number where a string is expected: >vim + + echo filter([1, 2], 0) + vim9cmd echo filter([1, 2], 0) # E1024: Using a Number as a String +< + - Not using a number where a number is expected: >vim + + " In this example, Vim script treats v:false as 0 + function Not1029() + let b:l = [42] | unlet b:l[v:false] + endfunction + call Not1029() | echo b:l +< >vim9 + vim9script + def E1029(): void + b:l = [42] | unlet b:l[false] + enddef + E1029() # E1029: Expected number but got bool +< + - Using a string as a number: >vim + + let b:l = [42] | unlet b:l['#'] | echo b:l + vim9cmd b:l = [42] | vim9cmd unlet b:l['#'] # E1030: Using a string... +< + - Not using a number when it is required: >vim + + echo gettabinfo('a') + vim9cmd echo gettabinfo('a') # E1210: Number required for argument 1 +< + - Not using a bool when it is required: >vim + + echo char2nr('¡', 2) + vim9cmd echo char2nr('¡', 2) # E1212: Bool required for argument 2 +< + - Not using a number when a number is required (|E521|): >vim + + let &laststatus='2' + vim9cmd &laststatus = '2' +< + - Not using a string when a string is required (|E928|): >vim + + let &langmenu = 42 + vim9cmd &langmenu = 42 # E928: String required +< + - Comparing a |Special| with 'is' fails in some instances (|E1037|, |E1072|): >vim + + " 1 is echoed because these are both true + echo v:null is v:null && v:none is v:none + " 0 is echoed because all these expressions are false + echo v:none is v:null || v:none is 8 || v:true is v:none + " All these are errors in Vim9 script + vim9cmd echo v:null is v:null # E1037: Cannot use 'is' with special + vim9cmd echo v:none is v:none # E1037: Cannot use 'is' with special + vim9cmd echo v:none is v:null # E1037: Cannot use 'is' with special + vim9cmd echo v:none is 8 # E1072: Cannot compare special with numb + vim9cmd echo v:true is v:none # E1072: Cannot compare bool with special +< + Note: Although the last two Vim9 script examples above error using + `v:none`, they return `false` using `null` (which is the same + as `v:null` - see |v:null|): >vim9 + + vim9script + echo null is 8 # false + echo true is null # false +< + - Using a string where a bool is required (|E1135|): >vim + + echo '42' ? v:true : v:false + vim9cmd echo '42' ? true : false # E1135: Using a String as a Bool +< + - Using a bool as a number (|E1138|): >vim + + let &laststatus=v:true + vim9cmd &laststatus = true +< + - Not using a string where an argument requires a string (|E1174|) >vim + + echo substitute('Hallo', 'a', 'e', v:true) + vim9cmd echo substitute('Hallo', 'a', 'e', true) # E1174: String... +< +One consequence is that the item type of a list or dict given to |map()| must +not change when its type is either declared or inferred. For example, this +gives an error in Vim9 script, whereas in legacy Vim script it is allowed: >vim + + " legacy Vim script changes s:mylist to ['item 0', 'item 1'] + let s:mylist = [0, 1] + call map(s:mylist, {i -> $"item {i}"}) + echo s:mylist +< >vim9 + vim9script + var mylist = [0, 1] # Vim infers mylist is list + map(mylist, (i, _) => $"item {i}") # E1012: type mismatch... +< +The error occurs because `map()` tries to modify the list elements to strings, +which conflicts with the declared type. + +Use |mapnew()| instead. It creates a new list, and Vim infers its type if it +is not specified. Inferred and declared types are shown in this example: >vim9 + + vim9script + var mylist = [0, 1] + var infer = mylist->mapnew((i, _) => $"item {i}") + echo [infer, infer->typename()] + var declare: list = mylist->mapnew((i, _) => $"item {i}") + echo [declare, declare->typename()] +< +The key concept here is, variables with declared or inferred types cannot +have the types of the elements within their containers change. However, type +"changes" are allowed for either: + - a container literal (not bound to a variable), or + - a container where |copy()| or |deepcopy()| is used in method chaining. +Both are demonstrated in this example: >vim9 + + vim9script + # list literal + echo [1, 2]->map((_, v) => $"#{v}") + echo [1, 2]->map((_, v) => $"#{v}")->typename() + # deepcopy() in a method chain + var mylist = [1, 2] + echo mylist->deepcopy()->map((_, v) => $"#{v}") + echo mylist->deepcopy()->map((_, v) => $"#{v}")->typename() + echo mylist +< +The reasoning behind this is, when a type is either declared or inferred +and the list is passed around and changed, the declaration/inference must +always hold so that you can rely on the type to match the declared/inferred +type. For either a list literal or a fully copied list, that type safety is +not needed because the original list is unchanged (as "echo mylist" shows, +above). + +If the item type was not declared or determined to be "", it will not +change, even if all items later become the same type. However, when `mapnew()` +is used, inference means that the new list will reflect the type(s) present. +For example: >vim9 + + vim9script + # list + var mylist = [1, '2'] # mixed types, i.e., list + echo (mylist, mylist->typename()) # ([1, '2'], 'list') + mylist->map((_, v) => $"item {v}") # all items are now strings + echo (mylist, mylist->typename()) # both strings, but list + # mapnew() + var newlist = mylist->mapnew((_, v) => v) + echo (newlist, newlist->typename()) # newlist is a list +< +Using |extend()| and |extendnew()| is similar, i.e., a list literal may use +the former, so, this is okay: >vim9 + + vim9cmd echo [1, 2]->extend(['3']) # [1, 2, 3] +< +whereas, this is not: >vim9 + + vim9script + var mylist: list = [1, 2] + echo mylist->extend(['3']) # E1013: Argument 2: type mismatch +< +Using |extendnew()| is needed for extending an existing typed list, except +where the extension matches the list's type (or it is "any"). For example, +first extending with an element of the same type, then extending with a +different type: >vim9 + + vim9script + var mylist: list = [1, 2] + mylist->extend([3]) + echo mylist->extendnew(['4']) # [1, 2, 3, '4'] + +< *E1158* +Using |flatten()| is not allowed in Vim9 script, because it is intended +always to change the type. This even applies to a list literal +(unlike |map()| and |extend()|). Instead, use |flattennew()|: >vim9 + + vim9cmd [1, [2, 3]]->flatten() # E1158: Cannot use flatten + vim9cmd echo [1, [2, 3]]->flattennew() # [1, 2, 3] +< +Assigning to a funcref with specified arguments (see |vim9-func-declaration|) +involves strict type checking of the arguments. For example, this works: >vim9 + + vim9script + var F_name_age: func(string, number): string + F_name_age = (n: string, a: number): string => $"Name: {n}, Age: {a}" + echo F_name_age('Bob', 42) +< +whereas this fails with error |E1012| (type mismatch): >vim9 + + vim9script + var F_name_age: func(string, number): string + F_name_age = (n: string, a: string): string => $"Name: {n}, Age: {a}" +< +If there is a variable number of arguments they must have the same type, as in +this example: >vim9 + + vim9script + var Fproduct: func(...list): number + Fproduct = (...v: list): number => reduce(v, (a, b) => a * b) + echo Fproduct(3, 2, 4) # Echoes 24 +< +And may be used to accommodate mixed types: >vim9 + + vim9script + var FlatSort: func(...list): any + FlatSort = (...v: list) => flattennew(v)->sort('n') + echo FlatSort(true, [[[5, 3], 2], 4]) # Echoes [true, 2, 3, 4, 5] +< + Note: Using in a lambda does not avoid type checking of the + funcref. It remains constrained by the declared funcref's + type and, as these examples show, a runtime or compiling error + occurs when the types mismatch: >vim9 + + vim9script + var FuncSN: func(string): number + FuncSN = (v: any): number => v->str2nr() + echo FuncSN('162')->nr2char() # Echoes ¢ + echo FuncSN(162)->nr2char()) # E1013 (runtime error) +< >vim9 + vim9script + var FuncSN: func(string): number + FuncSN = (v: any): number => v->str2nr() + def FuncSNfail(): void + echo FuncSN('162')->nr2char() # No echo because ... + echo FuncSN(162)->nr2char() # Error while compiling + enddef + FuncSNfail() +< +When the funcref has no arguments specified, there is no type checking. This +example shows FlexArgs has a string argument the first time and a list the +following time: >vim9 + + vim9script + var FlexArgs: func: string + FlexArgs = (s: string): string => $"It's countdown time {s}..." + echo FlexArgs("everyone") + FlexArgs = (...values: list): string => join(values, ', ') + echo FlexArgs('3', '2', '1', 'GO!') +< + *E1211* *E1217* *E1218* *E1219* *E1220* *E1221* *E1222* + *E1223* *E1224* *E1225* *E1226* *E1228* *E1235* *E1238* + *E1251* *E1253* *E1256* *E1297* *E1298* *E1301* *E1528* + *E1529* *E1530* *E1531* *E1534* Types are checked for most builtin functions to make it easier to spot -mistakes. +mistakes. The following one-line |:vim9| commands, calling builtin functions, +demonstrate many of those type-checking errors: >vim9 + + vim9 9->list2blob() # E1211: List required for argument 1 + vim9 9->ch_close() # E1217: Channel or Job required for + vim9 9->job_info() # E1218: Job required for argument 1 + vim9 [9]->cos() # E1219: Float or Number required for + vim9 {}->remove([]) # E1220: String or Number required + vim9 null_channel->ch_evalraw(9) # E1221: String or Blob required for + vim9 9->col() # E1222: String or List required for + vim9 9->complete_add() # E1223: String or Dictionary require + vim9 setbufline(9, 9, {}) # E1224: String, Number or List + vim9 9->count(9) # E1225: String, List, Tuple or Dict + vim9 9->add(9) # E1226: List or Blob required for + vim9 9->remove(9) # E1228: List, Dictionary, or Blob + vim9 getcharstr('9') # E1235: Bool or number required for + vim9 9->blob2list() # E1238: Blob required for argument 1 + vim9 9->filter(9) # E1251: List, Tuple, Dictionary, Blo + vim9 9->reverse() # E1253: String, List, Tuple or Blob + vim9 9->call(9) # E1256: String or Function required + vim9 null_dict->winrestview() # E1297: Non-NULL Dictionary required + vim9 {}->prop_add_list(null_list) # E1298: Non-NULL List required for + vim9 {}->repeat(9) # E1301: String, Number, List, Tuple + vim9 9->index(9) # E1528: List or Tuple or Blob + vim9 9->join() # E1529: List or Tuple required for + vim9 9->max() # E1530: List or Tuple or Dictionary + vim9 9->get(9) # E1531: Argument of get() must be a + vim9 9->tuple2list() # E1534: Tuple required for argument +< +Reserved for future use: *E1227* *E1250* *E1252* + E1227: List or Dictionary required for argument %d + E1250: Argument of %s must be a List, String, Dictionary or Blob + E1252: String, List or Blob required for argument %d + Categories of variables, defaults and null handling ~ - *variable-categories* *null-variables* -There are categories of variables: + *variable-categories* *null-variables* +There are three categories of variables: primitive number, float, boolean container string, blob, list, tuple, dict specialized function, job, channel, user-defined-object When declaring a variable without an initializer, an explicit type must be -provided. Each category has different default initialization semantics. Here's -an example for each category: > - var num: number # primitives default to a 0 equivalent - var cont: list # containers default to an empty container - var spec: job # specialized variables default to null +provided. Each category has different default initialization semantics. + +Primitives default to type-specific values. All primitives are empty but do +not equal `null`: >vim9 + + vim9script + var n: number | echo [n, n->empty(), n == null] # [0, 1, false] + var f: float | echo [f, f->empty(), f == null] # [0.0, 1, false] + var b: bool | echo [b, b->empty(), b == null] # [false, 1, false] < -Vim does not have a familiar null value; it has various null_ predefined -values, for example |null_string|, |null_list|, |null_job|. Primitives do not -have a null_. The typical use cases for null_ are: -- to clear a variable and release its resources; -- as a default for a parameter in a function definition, see |null-compare|. +Containers default to an empty container. Only an empty string equals `null`: >vim9 + + vim9script + var s: string | echo [s, s->empty(), s == null] # ['', 1, true] + var z: blob | echo [z, z->empty(), z == null] # [0z, 1, false] + var l: list | echo [l, l->empty(), l == null] # [[], 1, false] + var t: tuple | echo [t, t->empty(), t == null] # [(), 1, false] + var d: dict | echo [d, d->empty(), d == null] # [{}, 1, false] +< +Specialized types default to equaling `null`: >vim9 + + vim9script + var F: func | echo [F, F == null] # [function(''), true] + var j: job | echo [j, j == null] # ['no process', true] + var c: channel | echo [c, c == null] # ['channel fail', true] + class Class + endclass + var o: Class | echo [o, o == null] # [object of [unknown], true] + enum Enum + endenum + var e: Enum | echo [e, e == null] # [object of [unknown], true] +< + Note: See |empty()| for explanations of empty job, empty channel, and + empty object types. + +Vim does not have a familiar null value. Instead, it has various null_ +predefined values including |null_string|, |null_list|, and |null_job|. +Primitives do not have a null_. Typical use cases for null_ are: + - to clear a variable and release its resources, + - as a default for a parameter in a function definition (for an example, + see |null_blob|), or + - assigned to a container or specialized variable to set it to null + for later comparison (for an example, see |null-compare|). For a specialized variable, like `job`, null_ is used to clear the -resources. For a container variable, resources can also be cleared by -assigning an empty container to the variable. For example: > - var j: job = job_start(...) - # ... job does its work - j = null_job # clear the variable and release the job's resources +resources. For example: >vim9 - var l: list - # ... add lots of stuff to list - l = [] # clear the variable and release container resources -Using the empty container, rather than null_, to clear a container -variable may avoid null complications as described in |null-anomalies|. + vim9script + var mydate: list + def Date(channel: channel, msg: string): void + mydate->add(msg) + enddef + var myjob = job_start([&shell, &shellcmdflag, 'date'], {out_cb: Date}) + echo [myjob, myjob->job_status()] + sleep 2 + echo $"The date and time is {mydate->join('')}" + echo [myjob, myjob->job_status()] + myjob = null_job # Clear the variable; release the job's resources. + echo myjob +< +For a container variable, resources may also be cleared by assigning an +empty container to the variable. For example: >vim9 + + vim9script + var perfect: list = [1, 4] + perfect->extend([9, 16, 25]) + perfect = [] + echo perfect + +Using an empty container, rather than null_, to clear a container +variable may avoid null complications - see |null-anomalies|. The initialization semantics of container variables and specialized variables -differ. An uninitialized container defaults to an empty container: > - var l1: list # empty container - var l2: list = [] # empty container - var l3: list = null_list # null container -"l1" and "l2" are equivalent and indistinguishable initializations; but "l3" -is a null container. A null container is similar to, but different from, an -empty container, see |null-anomalies|. +differ. For containers: + - An uninitialized container defaults to empty but does not equal `null` + (except for a uninitialized string). + - A container initialized to [], (), {}, "", or 0z is empty but does not + equal `null`. + - A container initialized as null_ defaults to empty and equals `null`. -Specialized variables default to null. These job initializations are -equivalent and indistinguishable: > +In the following example, the uninitialized list ("lu") and [] initialized +list ("li") are equivalent and indistinguishable whereas "ln" is a null +container, which is similar to, but not equivalent to, an empty container +(see |null-anomalies|). >vim9 + + vim9script + # uninitialized: empty container, not null + var lu: list + echo ['lu', $"empty={lu->empty()}", $"null={lu == null}"] + # initialized: empty container, not null + var li: list = [] + echo ['li', $"empty={li->empty()}", $"null={li == null}"] + # initialized: empty container, null + var ln: list = null_list + echo ['ln', $"empty={ln->empty()}", $"null={ln == null}"] +< +Specialized variables default to equaling null. These job initializations +are equivalent and indistinguishable: >vim9 + + vim9script var j1: job var j2: job = null_job var j3 = null_job + echo (j1 == j2) == (j2 == j3) # true (equivalent, indistinguishable) +< +When a list, tuple, or dict is declared, if the item type is not specified +it cannot be inferred. Consequently, the item type defaults to "any": >vim9 -When a list or dict is declared, if the item type is not specified and can not -be inferred, then the type is "any": > - var d1 = {} # type is "dict" - var d2 = null_dict # type is "dict" - -Declaring a function, see |vim9-func-declaration|, is particularly unique. + vim9script + var [t1, t2] = [(), null_tuple] + echo $'t1 is {t1->typename()} and t2 is {t2->typename()} too' +< +Tuples and functions (or partials) may be declared in various ways. +See |tuple-type|, |variadic-tuple|, and |vim9-func-declaration|. *null-compare* -For familiar null compare semantics, where a null container is not equal to -an empty container, do not use null_ in a comparison: > +For familiar null compare semantics, where an empty container is not equal to +a null container, do not use null_ in a comparison. That is because, +in Vim9 script, although null_ == `null`, comparing an: + + - empty container to `null` is `false`, but + - empty container to null_ is `true`. + +So, compare against `null`, not null_. For example: >vim9 + vim9script - def F(arg: list = null_list) - if arg == null - echo "null" - else - echo printf("not null, %sempty", empty(arg) ? '' : 'not ') - endif + var bonds: dict> = {g: ['007', '008'], o: ['007', '009']} + def Search(query: string): list + return query == "\r" ? null_list : bonds->get(query, []) enddef - F() # output: "null" - F(null_list) # output: "null" - F([]) # output: "not null, empty" - F(['']) # output: "not null, not empty" -The above function takes a list of strings and reports on it. -Change the above function signature to accept different types of arguments: > - def F(arg: list = null_list) # any type of list - def F(arg: any = null) # any type + echo "Goldfinger (g) or Octopussy (o)?: " + const C: string = getcharstr() + var result: list = C->Search() + if result == null # <<< DO NOT USE null_list HERE! + echo "Error: Nothing was entered" + else + echo result->empty() ? $"No matches for '{C}'" : $"{result}" + endif < -In the above example, where the goal is to distinguish a null list from an -empty list, comparing against `null` instead of `null_list` is the correct -choice. The basic reason is because "null_list == null" and "[] != null". -Comparing to `null_list` fails since "[] == null_list". In the following section -there are details about comparison results. + NOTE: Using "result == null_list" instead of "result == null" would + fail to distinguish the error (nothing entered) and the valid + (nothing matched) result because [] == null_list whereas + [] != null. + +Conceptually, think of the null_ construct as a hybrid/bridge between +the general `null` and typed `empty` containers, having properties of both. +In the following section there are details about comparison results. *null-details* *null-anomalies* This section describes issues about using null and null_; included below -are the enumerated results of null comparisons. In some cases, if familiar -with vim9 null semantics, the programmer may chose to use null_ in +are the enumerated results of null comparisons. In some cases, if familiar +with vim9 null semantics, the programmer may choose to use null_ in comparisons and/or other situations. -Elsewhere in the documentation it says: - Quite often a null value is handled the same as an empty value, but - not always -Here's an example: > +Elsewhere in the documentation it says, "often a null value is handled the +same as an empty value, but not always". For example, you cannot add to a +null container: >vim9 + vim9script - var s1: list - var s2: list = null_list - echo s1 # output: "[]" - echo s2 # output: "[]" - - echo s1 + ['a'] # output: "['a']" - echo s2 + ['a'] # output: "['a']" - - echo s1->add('a') # output: "['a']" - echo s2->add('a') # E1130: Can not add to null list + var le: list = [] + le->add('Okay') # le is now ['Okay'] + var ln = null_list + ln->add("E1130") # E1130: Cannot add to null list < -Two values equal to a null_ are not necessarily equal to each other: > +As explained in |null-compare|, there is a non-transitive relationship among +`null`, null_ containers, and `empty`. To recap, for example: >vim9 + + vim9cmd echo (null_dict == {}, null_dict == null, {} != null) +< +The exception is an uninitialized string. It is equal to `null` (and is the +same instance as `null_string`). The 'is' operator (|expr-is|) may be used to +determine whether a string is uninitialized: >vim9 + vim9script - echo {} == null_dict # true - echo null_dict == null # true - echo {} == null # false + var s: string + echo s == null_string # true + echo s is null_string # true (the same instance) + echo s == null # true (unexpected, perhaps) + echo s is null # false (not the same instance) < -Unlike the other containers, an uninitialized string is equal to null. The -'is' operator can be used to determine if it is a null_string: > +However, don't do the same for the other containers because, when evaluated +against their applicable null_ with 'is', they return `false`: >vim9 + vim9script - var s1: string - var s2 = null_string - echo s1 == null # true - this is unexpected - echo s2 == null # true - echo s2 is null_string # true - - var b1: blob - var b2 = null_blob - echo b1 == null # false - echo b2 == null # true + var d: dict + echo d == null_dict # true + echo d is null_dict # false (not the same instance) + echo d == null # false (as expected) + echo d is null # false (not the same instance) < -Any variable initialized to the null_ is equal to the null_ and is -also equal to null. For example: > +The key distinction here is an uninitialized string is implemented as +`null_string`, while an uninitialized list, dict, tuple, or blob is +implemented as an empty container ([], {}, (), and 0z respectively). +So, those uninitialized types are equal to, but not the same instance as, +their null_ counterparts, as this example shows: >vim9 + vim9script - var x = null_blob - echo x == null_blob # true - echo x == null # true + var t: tuple + echo t == null_tuple # true + echo t is null_tuple # false + +However, a variable initialized to the null_ is equal not only to the +null_, it is also equal to null. For example: >vim9 + + vim9script + var t: tuple = null_tuple + echo t == null_tuple # true + echo t is null_tuple # true + echo t == null # true < -An uninitialized variable is usually equal to null; it depends on its type: - var s: string s == null - var b: blob b != null *** - var l: list l != null *** - var t: tuple t != null *** - var d: dict d != null *** - var f: func f == null - var j: job j == null - var c: channel c == null - var o: Class o == null +An uninitialized container variable is not equal to null, except for an +uninitialized string, which is explained in an example, above. So, these +all echo `true`: >vim9 -A variable initialized to empty equals null_; but not null: - var s2: string = "" == null_string != null - var b2: blob = 0z == null_blob != null - var l2: list = [] == null_list != null - var t2: tuple = () == null_tuple != null - var d2: dict = {} == null_dict != null + vim9script + var b: blob | echo b != null + var d: dict | echo d != null + var l: list | echo l != null + var t: tuple | echo t != null + var s: string | echo s == null -NOTE: the specialized variables, like job, default to null value and have no -corresponding empty value. +An uninitialized specialized variable is equal to null so these all echo `true`: >vim9 + + vim9script + var c: channel | echo c == null + var F: func | echo F == null + var j: job | echo j == null + class Class + endclass + var nc: Class | echo nc == null + enum Enum + endenum + var ne: Enum | echo ne == null +< + Note: the specialized variables, like job, default to null and + no specialized variable has a corresponding empty value. + +A container variable initialized to empty equals null_, so these are all +`true`: >vim9 + + vim9script + var s: string = "" | echo s == null_string + var b: blob = 0z | echo b == null_blob + var l: list = [] | echo l == null_list + var t: tuple = () | echo t == null_tuple + var d: dict = {} | echo d == null_dict +< +However, a container variable initialized to empty does not equal null, so +these are all `true`: >vim9 + + vim9script + var s: string = "" | echo s != null + var b: blob = 0z | echo b != null + var l: list = [] | echo l != null + var t: tuple = () | echo t != null + var d: dict = {} | echo d != null +< ============================================================================== @@ -1972,13 +2538,13 @@ errors: >vim9 vim9script My1558() - # Vim(eval):E1558: Unknown generic function: My1558 + # E1558: Unknown generic function: My1558 < >vim9 vim9script def My1560(): void enddef My1560() - # Vim(echo):E1560: Not a generic function: My1560 + # E1560: Not a generic function: My1560 < *E1561* Type parameter names must not clash with other identifiers: >vim9 diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index 0991c1b77a..3d58184224 100644 --- a/runtime/doc/vim9class.txt +++ b/runtime/doc/vim9class.txt @@ -1,4 +1,4 @@ -*vim9class.txt* For Vim version 9.1. Last change: 2025 Aug 27 +*vim9class.txt* For Vim version 9.1. Last change: 2025 Nov 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -766,7 +766,7 @@ The following builtin methods are supported: A class method cannot be used as a builtin method. Defining an interface ~ - *Interface* *:interface* *:endinterface* + *interface* *Interface* *:interface* *:endinterface* An interface is defined between `:interface` and `:endinterface`. It may be prefixed with `:export`: > From fe249721390cae1ad26f8637bdfe4716bb5bb241 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 11 Nov 2025 16:37:09 +0000 Subject: [PATCH 40/54] runtime(vim): Update base syntax, refine object constructor matching Match "object" and "<" ... ">" separately with dedicated syntax groups to allow for highlighting distinct from that generally used for types. closes: #18721 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/syntax/generator/vim.vim.base | 18 ++++++++++------- .../dumps/vim9_types_example_object_00.dump | 4 ++-- .../dumps/vim9_types_example_object_01.dump | 12 +++++------ .../testdir/dumps/vim9_types_object_00.dump | 20 +++++++++---------- .../testdir/dumps/vim9_types_object_01.dump | 12 +++++------ .../input/vim9_types_example_object.vim | 2 -- .../testdir/input/vim9_types_object.vim | 4 ++-- runtime/syntax/vim.vim | 18 ++++++++++------- 8 files changed, 48 insertions(+), 42 deletions(-) diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 7aae3055b7..6f1b73be47 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 10 +" Last Change: 2025 Nov 11 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -585,9 +585,10 @@ syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType conta syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType syn keyword vimType contained blob bool channel float job number string void syn keyword vimTypeAny contained any -syn region vimTypeObject contained - \ matchgroup=vimType - \ start="\v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 |#+0#0000e05&| |V|i|m|9| |o|b|j|e|c|t| |t|y|p|e| |c|o|n|s|t|r|u|c|t|o|r| +0#0000000&@44 -|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|T|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@31 -|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|9|V|a|r|i|a|b|l|e|T|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@22 @75 @75 |#+0#0000e05&| |I|s@1|u|e| |#|1|8|6|7@1| |(|N|o| |r|e|c|o|g|n|i|t|i|o|n| |o|f| |o|b|j|e|c|t|<|a|n|y|>| |t|y|p|e|s| |-| |A|l|i|a|k|s|e|i| |B|u|d|a|v|e|i|)| +0#0000000&@3 @@ -17,4 +15,6 @@ |e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66 @75 |e+0#af5f00255&|n|u|m| +0#0000000&|E| |i+0#af5f00255&|m|p|l|e|m|e|n|t|s| +0#0000000&|I| @55 +@2|I|N|S|T|A|N|C|E| @64 +@75 @57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump b/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump index 4f2100214d..21d48d7c59 100644 --- a/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump +++ b/runtime/syntax/testdir/dumps/vim9_types_example_object_01.dump @@ -1,11 +1,9 @@ -| +0&#ffffff0@1|d+0#af5f00255&|e|f| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@52 -@4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|C|"| +0#0000000&@60 -@2|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@66 +| +0&#ffffff0@1|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@66 |e+0#af5f00255&|n|d|c|l|a|s@1| +0#0000000&@66 @75 ->e+0#af5f00255&|n|u|m| +0#0000000&|E| |i+0#af5f00255&|m|p|l|e|m|e|n|t|s| +0#0000000&|I| @55 +|e+0#af5f00255&|n|u|m| +0#0000000&|E| |i+0#af5f00255&|m|p|l|e|m|e|n|t|s| +0#0000000&|I| @55 @2|I|N|S|T|A|N|C|E| @64 -@75 +> @74 @2|d+0#af5f00255&|e|f| +0#0000000&|s+0#00e0e07&|t|r|i|n|g|(+0#e000e06&|)|:+0#0000000&| |s+0#00e0003&|t|r|i|n|g| +0#0000000&@52 @4|r+0#af5f00255&|e|t|u|r|n| +0#0000000&|"+0#e000002&|E|"| +0#0000000&@60 @2|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@66 @@ -17,4 +15,6 @@ |e+0#af5f00255&|c|h|o| +0#0000000&|(+0#e000e06&|c+0#0000000&|,| |e|)+0#e000e06&| +0#0000000&|=+0#af5f00255&@1| +0#0000000&|o|s| @57 @75 |~+0#4040ff13&| @73 -| +0#0000000&@56|1|9|,|1| @9|B|o|t| +|~| @73 +|~| @73 +| +0#0000000&@56|1|9|,|0|-|1| @7|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim9_types_object_00.dump b/runtime/syntax/testdir/dumps/vim9_types_object_00.dump index ea653037e4..efd7f06a07 100644 --- a/runtime/syntax/testdir/dumps/vim9_types_object_00.dump +++ b/runtime/syntax/testdir/dumps/vim9_types_object_00.dump @@ -1,20 +1,20 @@ >v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64 |#+0#0000e05&| |V|i|m|9| |o|b|j|e|c|t| |t|y|p|e| |c|o|n|s|t|r|u|c|t|o|r| +0#0000000&@44 -|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|I|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@31 -|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|9|V|a|r|i|a|b|l|e|I|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@22 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|T|y|p|e|O|b|j|e|c|t| |T|o|d|o| +0#0000000&@31 +|#+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|T|y|p|e|O|b|j|e|c|t|B|r|a|c|k|e|t| |T|i|t|l|e| +0#0000000&@23 @75 @75 |i+0#af5f00255&|n|t|e|r|f|a|c|e| +0#0000000&|I| @63 |e+0#af5f00255&|n|d|i|n|t|e|r|f|a|c|e| +0#0000000&@62 @75 -|v+0#af5f00255&|a|r| +0#0000000&|a|:| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&| +0#0000000&@58 -|v+0#af5f00255&|a|r| +0#0000000&|b|:| |o+0#00e0003&|b|j|e|c|t|<|a|n|y|>| +0#0000000&@56 -|v+0#af5f00255&|a|r| +0#0000000&|c|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1| +0#0000000&@50 -|v+0#af5f00255&|a|r| +0#0000000&|d|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|a|n|y|>@1| +0#0000000&@48 +|v+0#af5f00255&|a|r| +0#0000000&|a|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&| +0#0000000&@58 +|v+0#af5f00255&|a|r| +0#0000000&|b|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|a+0#00e0003&|n|y|>+0#e000e06&| +0#0000000&@56 +|v+0#af5f00255&|a|r| +0#0000000&|c|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&@1| +0#0000000&@50 +|v+0#af5f00255&|a|r| +0#0000000&|d|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|a+0#00e0003&|n|y|>+0#e000e06&@1| +0#0000000&@48 @75 |d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66 -@4|a|r|g|1|:| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&|,+0#0000000&| @54 -@4|a|r|g|2|:| |o+0#00e0003&|b|j|e|c|t|<|a|n|y|>|,+0#0000000&| @52 -@4|a|r|g|3|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1|,+0#0000000&| @46 -@4|a|r|g|4|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|a|n|y|>@1|)+0#e000e06&| +0#0000000&@44 +@4|a|r|g|1|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&|,+0#0000000&| @54 +@4|a|r|g|2|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|a+0#00e0003&|n|y|>+0#e000e06&|,+0#0000000&| @52 +@4|a|r|g|3|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&@1|,+0#0000000&| @46 +@4|a|r|g|4|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|a+0#00e0003&|n|y|>+0#e000e06&@1|)| +0#0000000&@44 @57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim9_types_object_01.dump b/runtime/syntax/testdir/dumps/vim9_types_object_01.dump index d4031aa10d..7f9cd31527 100644 --- a/runtime/syntax/testdir/dumps/vim9_types_object_01.dump +++ b/runtime/syntax/testdir/dumps/vim9_types_object_01.dump @@ -1,15 +1,15 @@ | +0&#ffffff0@74 |d+0#af5f00255&|e|f| +0#0000000&|F|o@1|(+0#e000e06&| +0#0000000&@66 -@4|a|r|g|1|:| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&|,+0#0000000&| @54 -@4|a|r|g|2|:| |o+0#00e0003&|b|j|e|c|t|<|a|n|y|>|,+0#0000000&| @52 -@4|a|r|g|3|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1|,+0#0000000&| @46 -@4>a|r|g|4|:| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|a|n|y|>@1|)+0#e000e06&| +0#0000000&@44 +@4|a|r|g|1|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&|,+0#0000000&| @54 +@4|a|r|g|2|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|a+0#00e0003&|n|y|>+0#e000e06&|,+0#0000000&| @52 +@4|a|r|g|3|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&@1|,+0#0000000&| @46 +@4>a|r|g|4|:| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|a+0#00e0003&|n|y|>+0#e000e06&@1|)| +0#0000000&@44 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|B|a|r|(+0#e000e06&|)|:+0#0000000&| |o+0#00e0003&|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&| +0#0000000&@54 +|d+0#af5f00255&|e|f| +0#0000000&|B|a|r|(+0#e000e06&|)|:+0#0000000&| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&| +0#0000000&@54 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 -|d+0#af5f00255&|e|f| +0#0000000&|B|a|z|(+0#e000e06&|)|:+0#0000000&| |o+0#00e0003&|b|j|e|c|t|<|o|b|j|e|c|t|<|I+0#0000000&|>+0#00e0003&@1| +0#0000000&@46 +|d+0#af5f00255&|e|f| +0#0000000&|B|a|z|(+0#e000e06&|)|:+0#0000000&| |o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|o+0#0000001#ffff4012|b|j|e|c|t|<+0#e000e06#ffffff0|I+0#0000000&|>+0#e000e06&@1| +0#0000000&@46 |e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 @75 |~+0#4040ff13&| @73 diff --git a/runtime/syntax/testdir/input/vim9_types_example_object.vim b/runtime/syntax/testdir/input/vim9_types_example_object.vim index 4d36cc9259..f5f902db7f 100644 --- a/runtime/syntax/testdir/input/vim9_types_example_object.vim +++ b/runtime/syntax/testdir/input/vim9_types_example_object.vim @@ -1,7 +1,5 @@ vim9script # Vim9 object type constructor -# VIM_TEST_SETUP hi link vimTypeObject Todo -# VIM_TEST_SETUP hi link vim9VariableTypeObject Todo # Issue #18677 (No recognition of object types - Aliaksei Budavei) diff --git a/runtime/syntax/testdir/input/vim9_types_object.vim b/runtime/syntax/testdir/input/vim9_types_object.vim index 7066464559..7cf6eec05a 100644 --- a/runtime/syntax/testdir/input/vim9_types_object.vim +++ b/runtime/syntax/testdir/input/vim9_types_object.vim @@ -1,7 +1,7 @@ vim9script # Vim9 object type constructor -# VIM_TEST_SETUP hi link vimIypeObject Todo -# VIM_TEST_SETUP hi link vim9VariableIypeObject Todo +# VIM_TEST_SETUP hi link vimTypeObject Todo +# VIM_TEST_SETUP hi link vimTypeObjectBracket Title interface I diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 5e1185a2b0..25879f46cf 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Nov 10 +" Last Change: 2025 Nov 11 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -639,9 +639,10 @@ syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType conta syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType syn keyword vimType contained blob bool channel float job number string void syn keyword vimTypeAny contained any -syn region vimTypeObject contained - \ matchgroup=vimType - \ start="\ Date: Tue, 11 Nov 2025 16:47:24 +0000 Subject: [PATCH 41/54] runtime(doc): Wrap some overlength lines in vim9{,class}.txt. closes: #18724 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/vim9.txt | 5 +++-- runtime/doc/vim9class.txt | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt index 6e65ca064c..c84c89ac6f 100644 --- a/runtime/doc/vim9.txt +++ b/runtime/doc/vim9.txt @@ -1,4 +1,4 @@ -*vim9.txt* For Vim version 9.1. Last change: 2025 Nov 10 +*vim9.txt* For Vim version 9.1. Last change: 2025 Nov 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3062,7 +3062,8 @@ much overhead that cannot be avoided. Therefore the `:def` method to define a new-style function had to be added, which allows for a function with different semantics. Most things still work as before, but some parts do not. A new way to define a function was -considered the best way to separate the legacy style code from Vim9 style code. +considered the best way to separate the legacy style code from Vim9 style +code. Using "def" to define a function comes from Python. Other languages use "function" which clashes with legacy Vim script. diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index 3d58184224..98c04d3020 100644 --- a/runtime/doc/vim9class.txt +++ b/runtime/doc/vim9class.txt @@ -1,4 +1,4 @@ -*vim9class.txt* For Vim version 9.1. Last change: 2025 Nov 10 +*vim9class.txt* For Vim version 9.1. Last change: 2025 Nov 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -661,8 +661,8 @@ The basic idea is to build on top of an existing class, add properties to it. The extended class is called the "base class" or "super class". The new class is called the "child class". -Object variables from the base class are all taken over by the child class. It -is not possible to override them (unlike some other languages). +Object variables from the base class are all taken over by the child class. +It is not possible to override them (unlike some other languages). *E1356* *E1357* *E1358* Object methods of the base class can be overruled. The signature (arguments, From b74ec159ddae8dac0f1a2f3777392336de08e0c5 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 11 Nov 2025 17:13:44 +0000 Subject: [PATCH 42/54] runtime(sqlcomplete): only set 'omnifunc' if dbext plugin was loaded fixes: #18716 Co-authored-by: gcanat <72149218+gcanat@users.noreply.github.com> Signed-off-by: Christian Brabandt --- runtime/autoload/sqlcomplete.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim index adbdbab894..4017ae9b05 100644 --- a/runtime/autoload/sqlcomplete.vim +++ b/runtime/autoload/sqlcomplete.vim @@ -3,6 +3,7 @@ " Maintainer: David Fishburn " Version: 16.0 " Last Change: 2017 Oct 15 +" 2025 Nov 11 by Vim project: only set 'omnifunc' if dbext script was loaded #18716 " Homepage: http://www.vim.org/scripts/script.php?script_id=1572 " Usage: For detailed help " ":help sql.txt" @@ -98,12 +99,11 @@ " Set completion with CTRL-X CTRL-O to autoloaded function. " This check is in place in case this script is " sourced directly instead of using the autoload feature. -if exists('&omnifunc') - " Do not set the option if already set since this - " results in an E117 warning. - if &omnifunc == "" - setlocal omnifunc=sqlcomplete#Complete - endif +" +" Do not set the option if already set since this +" results in an E117 warning. +if exists('&omnifunc') && &omnifunc == "" && exists('g:loaded_dbext') + setlocal omnifunc=sqlcomplete#Complete endif if exists('g:loaded_sql_completion') From 1ff3e701e49c04162c1bd68b58fb6588dda89fe0 Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Tue, 11 Nov 2025 17:20:13 +0000 Subject: [PATCH 43/54] patch 9.1.1905: tabpanel: truncates terminal output Problem: tabpanel: truncates terminal output (hokorobi) Solution: Use topframe->fr_width, not Columns (which includes the tabpanel width) (Hirohito Higashi) related: #18678 closes: #18707 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- src/terminal.c | 15 ++++++++------- src/version.c | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index ea2da14a6f..404cfa125a 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -291,10 +291,11 @@ set_term_and_win_size(term_T *term, jobopt_T *opt) #ifdef FEAT_GUI if (term->tl_system) { - // Use the whole screen for the system command. However, it will start - // at the command line and scroll up as needed, using tl_toprow. + // Use the entire screen (excluding the tabpanel area) for the system + // commands. However, it will start at the command line and scroll up + // as needed, using tl_toprow. term->tl_rows = Rows; - term->tl_cols = Columns; + term->tl_cols = topframe->fr_width; return; } #endif @@ -1340,7 +1341,7 @@ update_cursor(term_T *term, int redraw) #ifdef FEAT_GUI if (term->tl_system) windgoto(term->tl_cursor_pos.row + term->tl_toprow, - term->tl_cursor_pos.col); + firstwin->w_wincol + term->tl_cursor_pos.col); else #endif if (!term_job_running(term)) @@ -3989,15 +3990,15 @@ update_system_term(term_T *term) { if (pos.row < term->tl_rows) { - int max_col = MIN(Columns, term->tl_cols); + int max_col = MIN(topframe->fr_width, term->tl_cols); term_line2screenline(term, NULL, screen, &pos, max_col); } else pos.col = 0; - screen_line(curwin, term->tl_toprow + pos.row, 0, pos.col, Columns, -1, - 0); + screen_line(curwin, term->tl_toprow + pos.row, + firstwin->w_wincol, pos.col, topframe->fr_width, -1, 0); } term->tl_dirty_row_start = MAX_ROW; diff --git a/src/version.c b/src/version.c index 2acdf2a23f..177780a74c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1905, /**/ 1904, /**/ From efc3be77bbf707edad9cbbda7aef471de65411fd Mon Sep 17 00:00:00 2001 From: botantony Date: Tue, 11 Nov 2025 17:26:02 +0000 Subject: [PATCH 44/54] patch 9.1.1906: filetype: not all Ruby files are recognized Problem: filetype: not all Ruby files are recognized Solution: Detect *.rbi and Brewfile as ruby filetype (botantony). - `rbi` is a file extension used by Sorbet, typechecker for Ruby: https://sorbet.org/docs/rbi - `Brewfile` is a bundler file for Homebrew package manager: https://docs.brew.sh/Brew-Bundle-and-Brewfile closes: #18697 Signed-off-by: botantony Signed-off-by: Christian Brabandt --- runtime/autoload/dist/ft.vim | 6 +++++- src/testdir/test_filetype.vim | 4 +++- src/version.c | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 88e81099e6..2ab128a218 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -3,7 +3,7 @@ vim9script # Vim functions for file type detection # # Maintainer: The Vim Project -# Last Change: 2025 Oct 31 +# Last Change: 2025 Nov 11 # Former Maintainer: Bram Moolenaar # These functions are moved here from runtime/filetype.vim to make startup @@ -2571,6 +2571,8 @@ const ft_from_ext = { "builder": "ruby", "rxml": "ruby", "rjs": "ruby", + # Sorbet (Ruby typechecker) + "rbi": "ruby", # Rust "rs": "rust", # S-lang @@ -2999,6 +3001,8 @@ const ft_from_name = { "apt.conf": "aptconf", # BIND zone "named.root": "bindzone", + # Brewfile (uses Ruby syntax) + "Brewfile": "ruby", # Busted (Lua unit testing framework - configuration files) ".busted": "lua", # Bun history diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 31aa2b2d52..c2a8485c1f 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -695,7 +695,9 @@ def s:GetFilenameChecks(): dict> rrst: ['file.rrst', 'file.srst'], rst: ['file.rst'], rtf: ['file.rtf'], - ruby: ['.irbrc', 'irbrc', '.irb_history', 'irb_history', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', 'Puppetfile', 'Vagrantfile'], + ruby: ['.irbrc', 'irbrc', '.irb_history', 'irb_history', 'file.rb', 'file.rbi', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', + 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', + 'Puppetfile', 'Vagrantfile', 'Brewfile'], rust: ['file.rs'], sage: ['file.sage'], salt: ['file.sls'], diff --git a/src/version.c b/src/version.c index 177780a74c..acb1c5d7cb 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1906, /**/ 1905, /**/ From 7dd51d35426b183aa5030f62f8b7e022943332eb Mon Sep 17 00:00:00 2001 From: notuxic Date: Tue, 11 Nov 2025 17:52:45 +0000 Subject: [PATCH 45/54] patch 9.1.1907: xterm: no support for mouse buttons 8 and 9 Problem: xterm: no support for mouse buttons 8 and 9 Solution: Add support for terminals with xterm-like mouse functionality (notuxic) closes: #18719 Signed-off-by: notuxic Signed-off-by: Christian Brabandt --- runtime/doc/term.txt | 5 +-- src/mouse.c | 12 +++++++- src/testdir/test_termcodes.vim | 56 ++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ src/vim.h | 3 ++ 5 files changed, 75 insertions(+), 3 deletions(-) diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 784105fe6e..4504c62d31 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 9.1. Last change: 2025 Nov 09 +*term.txt* For Vim version 9.1. Last change: 2025 Nov 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1167,7 +1167,8 @@ Mouse clicks can be mapped. The codes for mouse clicks are: The X1 and X2 buttons refer to the extra buttons found on some mice. The 'Microsoft Explorer' mouse has these buttons available to the right thumb. -Currently X1 and X2 only work on Win32 and X11 environments. +Currently, X1 and X2 work only on Win32 and X11 environments, and in terminals +that support xterm-like mouse functionality. Examples: > :noremap diff --git a/src/mouse.c b/src/mouse.c index 4bd1e592fc..d11491005c 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -2316,6 +2316,10 @@ check_termcode_mouse( * 0x23 = any button release * 0x60 = button 4 down (scroll wheel down) * 0x61 = button 5 down (scroll wheel up) + * 0x62 = button 6 down (scroll wheel left) + * 0x63 = button 7 down (scroll wheel right) + * 0xa0 = button 8 down (backward button) + * 0xa1 = button 9 down (forward button) * add 0x04 for SHIFT * add 0x08 for ALT * add 0x10 for CTRL @@ -2470,7 +2474,7 @@ check_termcode_mouse( * Linux console with GPM and the MS-DOS or Win32 console * (multi-clicks use >= 0x60). */ - if (mouse_code >= MOUSEWHEEL_LOW + if (mouse_code >= MOUSEWHEEL_LOW && mouse_code < MOUSESIDEBUTTONS_LOW # ifdef FEAT_GUI && !gui.in_use # endif @@ -2993,7 +2997,13 @@ check_termcode_mouse( held_button = MOUSE_RELEASE; } else + { +#if defined(UNIX) + if (use_xterm_mouse() && orig_mouse_code >= MOUSESIDEBUTTONS_LOW) + current_button = (current_button) ? MOUSE_X2 : MOUSE_X1; +#endif key_name[1] = get_pseudo_mouse_code(current_button, is_click, is_drag); + } // Make sure the mouse position is valid. Some terminals may return weird diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index 652a1bf8c1..ffe3576ff0 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -1641,6 +1641,62 @@ func Test_mouse_termcodes() %bw! endfunc +" Test buttons 8 and 9 for xterm-like terminal mouse support +func Test_term_mouse_side_buttons() + new + let save_mouse = &mouse + let save_term = &term + let save_ttymouse = &ttymouse + call test_override('no_query_mouse', 1) + set mouse=a term=xterm + call WaitForResponses() + + for ttymouse_val in g:Ttymouse_values + let msg = 'ttymouse=' .. ttymouse_val + exe 'set ttymouse=' .. ttymouse_val + + let mouse_codes = [ + \ ["", TerminalEscapeCode(128, 1, 1, 'M')], + \ ["", TerminalEscapeCode(128+32, 1, 1, 'M')], + \ ["", TerminalEscapeCode(129, 1, 1, 'M')], + \ ["", TerminalEscapeCode(129+32, 1, 1, 'M')], + \ ["", TerminalEscapeCode(128+4, 1, 1, 'M')], + \ ["", TerminalEscapeCode(129+4, 1, 1, 'M')], + \ ["", TerminalEscapeCode(128+8, 1, 1, 'M')], + \ ["", TerminalEscapeCode(129+8, 1, 1, 'M')], + \ ["", TerminalEscapeCode(128+16, 1, 1, 'M')], + \ ["", TerminalEscapeCode(129+16, 1, 1, 'M')], + \ ] + + for [outstr, code] in mouse_codes + exe "normal ggC\" . code + call assert_equal(outstr, getline(1), msg) + endfor + endfor + + " ttymouse_val 'sgr' + let msg = 'ttymouse=sgr' + exe 'set ttymouse=sgr' + + let mouse_codes = [ + \ ["", TerminalEscapeCode(128, 1, 1, 'M')], + \ ["", TerminalEscapeCode(128, 1, 1, 'm')], + \ ["", TerminalEscapeCode(129, 1, 1, 'M')], + \ ["", TerminalEscapeCode(129, 1, 1, 'm')], + \ ] + + for [outstr, code] in mouse_codes + exe "normal ggC\" . code + call assert_equal(outstr, getline(1), msg) + endfor + + let &mouse = save_mouse + let &term = save_term + let &ttymouse = save_ttymouse + call test_override('no_query_mouse', 0) + bwipe! +endfunc + " This only checks if the sequence is recognized. " This must be after other tests, because it has side effects to xterm " properties. diff --git a/src/version.c b/src/version.c index acb1c5d7cb..5578ccfc62 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1907, /**/ 1906, /**/ diff --git a/src/vim.h b/src/vim.h index 58823ec786..e41a68f1c2 100644 --- a/src/vim.h +++ b/src/vim.h @@ -2095,6 +2095,9 @@ typedef int sock_T; // Lowest button code for using the mouse wheel (xterm only) #define MOUSEWHEEL_LOW 0x60 +// Lowest button code for extra mouse buttons 8-11 +#define MOUSESIDEBUTTONS_LOW 0xa0 + #define MOUSE_CLICK_MASK 0x03 #define NUM_MOUSE_CLICKS(code) \ From f85951fee0e3ccd48ccfaeec9c09f96e325925d1 Mon Sep 17 00:00:00 2001 From: Neil Lambert Date: Tue, 11 Nov 2025 18:01:31 +0000 Subject: [PATCH 46/54] runtime(css): improve cssBoxProp matches closes: #18717 Signed-off-by: Neil Lambert Signed-off-by: Jay Sitter Signed-off-by: Christian Brabandt --- .github/MAINTAINERS | 2 ++ runtime/syntax/css.vim | 3 ++- runtime/syntax/testdir/dumps/css_1_00.dump | 20 ++++++++++++++++++++ runtime/syntax/testdir/input/css_1.css | 5 +++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 runtime/syntax/testdir/dumps/css_1_00.dump create mode 100644 runtime/syntax/testdir/input/css_1.css diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index b7e22e2020..fd371d6aff 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -13,6 +13,7 @@ nsis/lang/russian.nsi @RestorerZ runtime/autoload/freebasic.vim @dkearns runtime/autoload/hare.vim @selenebun runtime/autoload/hcl.vim @gpanders +runtime/autoload/javascriptcomplete.vim @jsit runtime/autoload/modula2.vim @dkearns runtime/autoload/rubycomplete.vim @segfault @dkearns runtime/autoload/rust.vim @lilyball @@ -463,6 +464,7 @@ runtime/syntax/chuck.vim @andreacfromtheapp runtime/syntax/clojure.vim @axvr runtime/syntax/codeowners.vim @jparise runtime/syntax/cs.vim @nickspoons +runtime/syntax/css.vim @jsit runtime/syntax/csv.vim @habamax runtime/syntax/cucumber.vim @tpope runtime/syntax/d.vim @JesseKPhillips diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index f4d09cfa4e..da3f3c73f1 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -8,6 +8,7 @@ " URL: https://github.com/vim-language-dept/css-syntax.vim " Maintainer: Jay Sitter " Last Change: 2024 Mar 2 +" 2025 Nov 11: improve support for cssBoxProperties #18717 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -197,7 +198,7 @@ syn keyword cssBorderAttr contained clone slice syn match cssBoxProp contained "\" syn match cssBoxProp contained "\" -syn match cssBoxProp contained "\<\(margin\|padding\)\(-\(inline\|block\)\(-\(start\|end\)\)\)\=\>" +syn match cssBoxProp contained "\<\(margin\|padding\)\(-\(inline\|block\)\(-\(start\|end\)\)\=\)\=\>" syn match cssBoxProp contained "\" syn match cssBoxProp contained "\" syn keyword cssBoxAttr contained visible hidden scroll auto diff --git a/runtime/syntax/testdir/dumps/css_1_00.dump b/runtime/syntax/testdir/dumps/css_1_00.dump new file mode 100644 index 0000000000..5590798ca3 --- /dev/null +++ b/runtime/syntax/testdir/dumps/css_1_00.dump @@ -0,0 +1,20 @@ +>d+0#af5f00255#ffffff0|i|v| +0#0000000&|{+0#00e0e07&| +0#0000000&@69 +@2|m+0#00e0003&|a|r|g|i|n|-|b|l|o|c|k|:+0#0000000&| |1+0#e000002&|p|x|;+0#0000000&| @54 +@2|m+0#00e0003&|a|r|g|i|n|-|b|l|o|c|k|-|s|t|a|r|t|:+0#0000000&| |1+0#e000002&|p|x|;+0#0000000&| @48 +@2|m+0#00e0003&|a|r|g|i|n|-|b|l|o|c|k|-|e|n|d|:+0#0000000&| |1+0#e000002&|p|x|;+0#0000000&| @50 +|}+0#00e0e07&| +0#0000000&@73 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/input/css_1.css b/runtime/syntax/testdir/input/css_1.css new file mode 100644 index 0000000000..70a14127ce --- /dev/null +++ b/runtime/syntax/testdir/input/css_1.css @@ -0,0 +1,5 @@ +div { + margin-block: 1px; + margin-block-start: 1px; + margin-block-end: 1px; +} From 89f0a3a5746d66706a2dae1e7e9ea065f5b0dcce Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 11 Nov 2025 18:06:31 +0000 Subject: [PATCH 47/54] patch 9.1.1908: tests: test_crash.vim times out in CI ASAN builds Problem: tests: test_crash.vim times out in CI ASAN builds Solution: Increase timeout for ASAN or Valgrind runs closes: #18725 Signed-off-by: Christian Brabandt --- src/testdir/test_crash.vim | 7 ++++++- src/version.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/testdir/test_crash.vim b/src/testdir/test_crash.vim index a26a1b8fd2..01ae64fbd0 100644 --- a/src/testdir/test_crash.vim +++ b/src/testdir/test_crash.vim @@ -6,7 +6,12 @@ CheckScreendump " Run the command in terminal and wait for it to complete via notification func s:RunCommandAndWait(buf, cmd) call term_sendkeys(a:buf, a:cmd .. "; printf '" .. TermNotifyParentCmd(v:false) .. "'\") - call WaitForChildNotification() + if ValgrindOrAsan() + " test times out on ASAN CI builds + call WaitForChildNotification(10000) + else + call WaitForChildNotification() + endif endfunc func Test_crash1() diff --git a/src/version.c b/src/version.c index 5578ccfc62..1969960673 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1908, /**/ 1907, /**/ From 4f19d2768a2251d03acd3a91f93cb3eb39595803 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 12 Nov 2025 19:17:11 +0000 Subject: [PATCH 48/54] runtime(vim): Update base syntax, match :prompt command args closes: #18732 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/syntax/generator/gen_syntax_vim.vim | 4 +- runtime/syntax/generator/vim.vim.base | 12 ++++- .../dumps/vim_ex_prompt_commands_00.dump | 20 ++++++++ .../dumps/vim_ex_prompt_commands_01.dump | 20 ++++++++ .../dumps/vim_ex_prompt_commands_02.dump | 20 ++++++++ .../testdir/input/vim_ex_prompt_commands.vim | 46 +++++++++++++++++++ runtime/syntax/vim.vim | 18 ++++++-- 7 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 runtime/syntax/testdir/dumps/vim_ex_prompt_commands_00.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_prompt_commands_01.dump create mode 100644 runtime/syntax/testdir/dumps/vim_ex_prompt_commands_02.dump create mode 100644 runtime/syntax/testdir/input/vim_ex_prompt_commands.vim diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index ebf1e23755..d3b645b685 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -1,7 +1,7 @@ " Vim syntax file generator " Language: Vim script " Maintainer: Hirohito Higashi (h_east) -" Last Change: 2025 Nov 08 +" Last Change: 2025 Nov 11 let s:keepcpo= &cpo set cpo&vim @@ -389,6 +389,8 @@ function s:get_vim_command_type(cmd_name) popup profdel profile + promptfind + promptrepl public python pyfile diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 6f1b73be47..98873f3e10 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -246,7 +246,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" skipwhite nextgroup=vimProfdelArg +" Prompt{find,repl}: {{{2 +" ================= +syn region vimPromptArg contained + \ start="\S" + \ skip=+\n\s*\%(\\\|["#]\\ \)+ + \ end="$" + \ contains=@vimContinue +syn keyword vimPrompt promptf[ind] promptr[epl] skipwhite nextgroup=vimPromptArg + " Redir: {{{2 " ===== syn match vimRedir "\" skipwhite nextgroup=vimRedirBang,vimRedirFileOperator,vimRedirVariableOperator,vimRedirRegister,vimRedirEnd @@ -2519,6 +2528,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimProfileBang vimBang hi def link vimProfdel vimCommand hi def link vimProfdelArg vimSpecial + hi def link vimPrompt vimCommand hi def link vimPython vimCommand hi def link vimPython3 vimCommand hi def link vimPythonX vimCommand diff --git a/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_00.dump b/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_00.dump new file mode 100644 index 0000000000..fb755ba282 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|p|r|o|m|p|t|{|f|i|n|d|,|r|e|p|l|}| |c|o|m@1|a|n|d|s| +0#0000000&@41 +@75 +@75 +|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|f|o@1| @60 +|p+0#af5f00255&|r|o|m|p|t|r|e|p|l| +0#0000000&|f|o@1| @60 +@75 +|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|a| @62 +@6|\+0#e000e06&| +0#0000000&|r|e|a|l@1|y| @60 +@6|\+0#e000e06&| +0#0000000&|l|o|n|g| @62 +@6|\+0#e000e06&| +0#0000000&|s|e|a|r|c|h| @60 +@6|\+0#e000e06&| +0#0000000&|s|t|r|i|n|g| @60 +|p+0#af5f00255&|r|o|m|p|t|r|e|p|l| +0#0000000&|a| @62 +@6|\+0#e000e06&| +0#0000000&|r|e|a|l@1|y| @60 +@6|\+0#e000e06&| +0#0000000&|l|o|n|g| @62 +@6|\+0#e000e06&| +0#0000000&|s|e|a|r|c|h| @60 +@6|\+0#e000e06&| +0#0000000&|s|t|r|i|n|g| @60 +@75 +@75 +|"+0#0000e05&| |n|o| |t|a|i|l| |c|o|m@1|e|n|t| |o|r| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@41 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_01.dump b/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_01.dump new file mode 100644 index 0000000000..dcf8400c29 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_01.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|l|o|n|g| @62 +@6|\+0#e000e06&| +0#0000000&|s|e|a|r|c|h| @60 +@6|\+0#e000e06&| +0#0000000&|s|t|r|i|n|g| @60 +@75 +@75 +>"+0#0000e05&| |n|o| |t|a|i|l| |c|o|m@1|e|n|t| |o|r| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@41 +@75 +|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|f|o@1| |"| |m|o|r|e| |s|e|a|r|c|h| |s|t|r|i|n|g| @39 +|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|f|o@1| ||| |m|o|r|e| |s|e|a|r|c|h| |s|t|r|i|n|g| @39 +@75 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|V|i|m|9|C|o|n|t|e|x|t|(+0#e000e06&|)| +0#0000000&@57 +@2|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|f|o@1| @58 +@2|p+0#af5f00255&|r|o|m|p|t|r|e|p|l| +0#0000000&|f|o@1| @58 +@75 +@2|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|a| @60 +@8|\+0#e000e06&| +0#0000000&|r|e|a|l@1|y| @58 +@8|\+0#e000e06&| +0#0000000&|l|o|n|g| @60 +@8|\+0#e000e06&| +0#0000000&|s|e|a|r|c|h| @58 +@57|1|9|,|1| @9|4|8|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_02.dump b/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_02.dump new file mode 100644 index 0000000000..688010a8e9 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_prompt_commands_02.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@7|\+0#e000e06&| +0#0000000&|s|e|a|r|c|h| @58 +@8|\+0#e000e06&| +0#0000000&|s|t|r|i|n|g| @58 +@2|p+0#af5f00255&|r|o|m|p|t|r|e|p|l| +0#0000000&|a| @60 +@8|\+0#e000e06&| +0#0000000&|r|e|a|l@1|y| @58 +@8|\+0#e000e06&| +0#0000000&|l|o|n|g| @60 +@8>\+0#e000e06&| +0#0000000&|s|e|a|r|c|h| @58 +@8|\+0#e000e06&| +0#0000000&|s|t|r|i|n|g| @58 +@75 +@75 +@2|#+0#0000e05&| |n|o| |t|a|i|l| |c|o|m@1|e|n|t| |o|r| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@39 +@75 +@2|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|f|o@1| |#| |m|o|r|e| |s|e|a|r|c|h| |s|t|r|i|n|g| @37 +@2|p+0#af5f00255&|r|o|m|p|t|f|i|n|d| +0#0000000&|f|o@1| ||| |m|o|r|e| |s|e|a|r|c|h| |s|t|r|i|n|g| @37 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +@75 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|7|,|2|-|9| @7|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_prompt_commands.vim b/runtime/syntax/testdir/input/vim_ex_prompt_commands.vim new file mode 100644 index 0000000000..1f15313155 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_prompt_commands.vim @@ -0,0 +1,46 @@ +" Vim :prompt{find,repl} commands + + +promptfind foo +promptrepl foo + +promptfind a + \ really + \ long + \ search + \ string +promptrepl a + \ really + \ long + \ search + \ string + + +" no tail comment or trailing bar + +promptfind foo " more search string +promptfind foo | more search string + + +def Vim9Context() + promptfind foo + promptrepl foo + + promptfind a + \ really + \ long + \ search + \ string + promptrepl a + \ really + \ long + \ search + \ string + + + # no tail comment or trailing bar + + promptfind foo # more search string + promptfind foo | more search string +enddef + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 25879f46cf..ece2ea7e4a 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -36,9 +36,9 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang' syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] buffers bun[load] bw[ipeout] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] col[der] colo[rscheme] comc[lear] comp[iler] con[tinue] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] delm[arks] deb[ug] defc[ompile] nextgroup=vimBang syn keyword vimCommand contained di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] his[tory] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] le[ft] lex[pr] lf[ile] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lhi[story] ll lla[st] lli[st] nextgroup=vimBang -syn keyword vimCommand contained lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] rund[o] rv[iminfo] sN[ext] sa[rgument] nextgroup=vimBang -syn keyword vimCommand contained sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] nextgroup=vimBang -syn keyword vimCommand contained u[ndo] undoj[oin] undol[ist] unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang +syn keyword vimCommand contained lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] nextgroup=vimBang +syn keyword vimCommand contained sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] nextgroup=vimBang +syn keyword vimCommand contained unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang " Lower priority :syn-match to allow for :command/function() distinction syn match vimCommand "\" nextgroup=vimBang @@ -300,7 +300,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" skipwhite nextgroup=vimProfdelArg +" Prompt{find,repl}: {{{2 +" ================= +syn region vimPromptArg contained + \ start="\S" + \ skip=+\n\s*\%(\\\|["#]\\ \)+ + \ end="$" + \ contains=@vimContinue +syn keyword vimPrompt promptf[ind] promptr[epl] skipwhite nextgroup=vimPromptArg + " Redir: {{{2 " ===== syn match vimRedir "\" skipwhite nextgroup=vimRedirBang,vimRedirFileOperator,vimRedirVariableOperator,vimRedirRegister,vimRedirEnd @@ -2581,6 +2590,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimProfileBang vimBang hi def link vimProfdel vimCommand hi def link vimProfdelArg vimSpecial + hi def link vimPrompt vimCommand hi def link vimPython vimCommand hi def link vimPython3 vimCommand hi def link vimPythonX vimCommand From 9ab6a22c900aab5fa1859f27d3394d50be04a412 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 12 Nov 2025 19:33:01 +0000 Subject: [PATCH 49/54] runtime(doc): Improve :help :ls description formatting Quote the special buffer names for consistency (see :help bufname()) and so that they're not incorrectly highlighted as optional command arguments. closes: #18730 Signed-off-by: Doug Kearns Signed-off-by: Christian Brabandt --- runtime/doc/windows.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index bedaa32608..5b77055a65 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 9.1. Last change: 2025 Nov 10 +*windows.txt* For Vim version 9.1. Last change: 2025 Nov 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1145,10 +1145,10 @@ list of buffers. |unlisted-buffer| or "N CTRL-^", where N is the buffer number. For the file name these special values are used: - [Prompt] |prompt-buffer| - [Popup] buffer of a |popup-window| - [Scratch] 'buftype' is "nofile" - [No Name] no file name specified + "[Prompt]" |prompt-buffer| + "[Popup]" buffer of a |popup-window| + "[Scratch]" 'buftype' is "nofile" + "[No Name]" no file name specified For a |terminal-window| buffer the status is used. Indicators (chars in the same column are mutually exclusive): From e9d296e52a6d0cb13d71b36ca60bfb470ce56868 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 12 Nov 2025 19:36:46 +0000 Subject: [PATCH 50/54] runtime(erlang): recognize -if/-elif as erlangPreCondit in syntax script The -if(Condition)/-elif(Condition) are compiler macros that evaluate the following lines only if Condition evaluates to true. This patch enables syntax highlighting for these macros. https://www.erlang.org/doc/system/macros.html#conditional-compilation closes: #18729 Signed-off-by: Vadim Yanitskiy Signed-off-by: Csaba Hoch Signed-off-by: Christian Brabandt --- runtime/syntax/erlang.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim index 3ef2c8d410..bbb03d52cd 100644 --- a/runtime/syntax/erlang.vim +++ b/runtime/syntax/erlang.vim @@ -3,7 +3,7 @@ " Maintainer: Csaba Hoch " Contributor: Adam Rutkowski " Johannes Christ -" Last Update: 2025-Jul-06 +" Last Update: 2025-Nov-12 " License: Vim license " URL: https://github.com/vim-erlang/vim-erlang-runtime @@ -217,7 +217,7 @@ syn match erlangInnerDocAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(moduledoc\|doc\)\> syn match erlangInclude '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment -syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment +syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|if\|elif\|endif\)\>' contains=erlangComment syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|nominal\|callback\)\>' contains=erlangComment " Keywords From 23e12c0b7ec02cc374f111fd9dfaa84734dbb7f5 Mon Sep 17 00:00:00 2001 From: Callum Andrew Date: Wed, 12 Nov 2025 19:43:28 +0000 Subject: [PATCH 51/54] patch 9.1.1909: filetype: .mom files recognized as nroff files Problem: filetype: .mom files recognized as nroff files Solution: Detect *.mom files as groff filetype instead (Callum Andrew) Reference: - mom macros are written specifically for groff: https://www.schaffter.ca/mom/ closes: #18718 Signed-off-by: Callum Andrew Signed-off-by: Christian Brabandt --- runtime/filetype.vim | 7 ++++--- src/testdir/test_filetype.vim | 3 ++- src/version.c | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9a6febdb2a..9fea9fa97b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: The Vim Project -" Last Change: 2025 Oct 09 +" Last Change: 2025 Nov 11 " Former Maintainer: Bram Moolenaar " If the filetype can be detected from extension or file name(the final path component), @@ -774,12 +774,13 @@ au BufNewFile,BufRead */neofetch/config.conf setf sh " Nginx au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/nginx/*.conf setf nginx -" Nroff/Troff (*.ms and *.t are checked below) +" Nroff/Groff/Troff (*.ms and *.t are checked below) au BufNewFile,BufRead *.me \ if expand("") != "read.me" && expand("") != "click.me" | \ setf nroff | \ endif -au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff +au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac setf nroff +au BufNewFile,BufRead *.groff,*.mom setf groff au BufNewFile,BufRead *.[0-9],*.[013]p,*.[1-8]x,*.3{am,perl,pm,posix,type},*.n call dist#ft#FTnroff() " Nroff or Objective C++ diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index c2a8485c1f..9bb0ef15cf 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -343,6 +343,7 @@ def s:GetFilenameChecks(): dict> grads: ['file.gs'], graphql: ['file.graphql', 'file.graphqls', 'file.gql'], gretl: ['file.gretl'], + groff: ['file.groff', 'file.mom'], groovy: ['file.gradle', 'file.groovy', 'Jenkinsfile'], group: ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'], grub: ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'], @@ -576,7 +577,7 @@ def s:GetFilenameChecks(): dict> nix: ['file.nix'], norg: ['file.norg'], nqc: ['file.nqc'], - nroff: ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'], + nroff: ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'tmac.file'], nsis: ['file.nsi', 'file.nsh'], ntriples: ['file.nt'], nu: ['file.nu'], diff --git a/src/version.c b/src/version.c index 1969960673..dc876dad3b 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1909, /**/ 1908, /**/ From d6679469289a854ea3b7de47ad3f1a8066693dd0 Mon Sep 17 00:00:00 2001 From: Aliaksei Budavei <0x000c70@gmail.com> Date: Wed, 12 Nov 2025 19:49:00 +0000 Subject: [PATCH 52/54] patch 9.1.1910: tests: test failures in Test_term_gettitle() in CI Problem: tests: test failures in Test_term_gettitle() in CI Solution: CI: Allow for title buffering in Test_term_gettitle() (Aliaksei Budavei) closes: #18693 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt --- src/testdir/test_terminal2.vim | 47 ++++++++++++++++++++++++++-------- src/version.c | 2 ++ 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim index d2fc4fc398..dea2e1fc51 100644 --- a/src/testdir/test_terminal2.vim +++ b/src/testdir/test_terminal2.vim @@ -632,6 +632,39 @@ func Test_term_getcursor() call StopShellInTerminal(buf) endfunc +func! s:TermPollAndAssertMatchTitle(term, old_name, new_pattern) abort + let new_name = '' + let next_part = '' + let prev_part = next_part + let times = 2048 + + " Ignore any pending or old title (or its tail part). + while (empty(new_name) || + \ a:old_name[max([0, strridx(a:old_name, new_name)]) :] ==# new_name) && + \ times > 0 + let new_name = term_gettitle(a:term) + let times -= 1 + sleep 1m + endwhile + + " FIXME: Allow for occasional title "buffering" (on MacOS) and fetch either + " the whole title or its parts. + while new_name !~# a:new_pattern && times > 0 + let next_part = term_gettitle(a:term) + + if next_part !=# prev_part + let new_name .= next_part + endif + + let prev_part = next_part + let times -= 1 + sleep 1m + endwhile + + call assert_match(a:new_pattern, new_name) + return new_name +endfunc + " Test for term_gettitle() " Known to be flaky on Mac-OS X and the GH runners func Test_term_gettitle() @@ -643,24 +676,16 @@ func Test_term_gettitle() if !has('title') || empty(&t_ts) throw "Skipped: can't get/set title" endif - if has('osx') && !empty($CI) && system('uname -m') =~# 'arm64' - " This test often fails with the following error message on Github runners - " MacOS-14 - " '^\\[No Name\\] - VIM\\d*$' does not match 'e] - VIM' - " Why? Is the terminal that runs Vim too small? - throw 'Skipped: FIXME: Running this test on M1 Mac fails on GitHub Actions' - endif let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', '-c', 'set title']) call TermWait(term) " When Vim is running as a server then the title ends in VIM{number}, thus " optionally match a number after "VIM". - call WaitForAssert({-> assert_match('^\[No Name\] - VIM\d*$', term_gettitle(term)) }) + let title = s:TermPollAndAssertMatchTitle(term, '', '^\[No Name\] - VIM\d*$') call term_sendkeys(term, ":e Xfoo\r") - call WaitForAssert({-> assert_match('^Xfoo (.*[/\\]testdir) - VIM\d*$', term_gettitle(term)) }) - + let title = s:TermPollAndAssertMatchTitle(term, title, '^Xfoo (.*[/\\]testdir) - VIM\d*$') call term_sendkeys(term, ":set titlestring=foo\r") - call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) }) + let title = s:TermPollAndAssertMatchTitle(term, title, 'foo') exe term . 'bwipe!' endfunc diff --git a/src/version.c b/src/version.c index dc876dad3b..eea70581fe 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1910, /**/ 1909, /**/ From c44e5ae529ba3547202121f9181a9be5c643aee9 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 12 Nov 2025 20:04:18 +0000 Subject: [PATCH 53/54] patch 9.1.1911: build failure on Solaris with gcc 5 Problem: build failure on Solaris Sparc with gcc 5 (idgn23, after v9.1.1736) Solution: Correctly initialize the key_name variable. fixes: #18693 Signed-off-by: Christian Brabandt --- src/term.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/term.c b/src/term.c index 4c365b19bd..c317ca6012 100644 --- a/src/term.c +++ b/src/term.c @@ -5362,7 +5362,7 @@ put_key_modifiers_in_typebuf( static int parse_csi_f_keys(int arg) { - char_u key_name[2] = ""; + char_u key_name[2] = { 0, 0 }; switch (arg) { diff --git a/src/version.c b/src/version.c index eea70581fe..5212d18888 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1911, /**/ 1910, /**/ From 8cb4505ec6263bb197af667abb5f428069be0352 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 12 Nov 2025 21:33:38 +0000 Subject: [PATCH 54/54] patch 9.1.1912: tests: test_plugin_comment fails Problem: tests: test_plugin_comment fails, because it depends on nroff filetype for .mom file (after v9.1.1909) Solution: Explicitly set filetype to nroff Signed-off-by: Christian Brabandt --- src/testdir/test_plugin_comment.vim | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/testdir/test_plugin_comment.vim b/src/testdir/test_plugin_comment.vim index 74a88f77ee..597a04d47d 100644 --- a/src/testdir/test_plugin_comment.vim +++ b/src/testdir/test_plugin_comment.vim @@ -58,7 +58,7 @@ func Test_backward_slash_uncomment() let input_file = "Test_backward_slash_uncomment_input.mom" call writefile(lines, input_file, "D") - let buf = RunVimInTerminal('-c "packadd comment" ' .. input_file, {}) + let buf = RunVimInTerminal('-c "packadd comment" -c "set ft=nroff" ' .. input_file, {}) call term_sendkeys(buf, "gcc") let output_file = "backward_slash_uncomment_test.mom" call term_sendkeys(buf, $":w {output_file}\") diff --git a/src/version.c b/src/version.c index 5212d18888..99849aa8b0 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1912, /**/ 1911, /**/