]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1888: Wrong display with cpo+=$, matchparen and wrapped line v9.1.1888
authorzeertzjq <zeertzjq@outlook.com>
Wed, 29 Oct 2025 20:15:01 +0000 (20:15 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 29 Oct 2025 20:15:01 +0000 (20:15 +0000)
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 <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
18 files changed:
src/drawscreen.c
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_01.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_02.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_03.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_04.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_05.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_06.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_07.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_08.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_09.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_10.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_11.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_12.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_13.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_14.dump [new file with mode: 0644]
src/testdir/dumps/Test_change_wrapped_line_cpo_dollar_15.dump [new file with mode: 0644]
src/testdir/test_display.vim
src/version.c

index 3cd2514d501a0f7f157a4bc0bfeadcdca049f5bf..7d3b3bd6ad5aeaaa02a6d5f2a60e5b584804c6fd 100644 (file)
@@ -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 (file)
index 0000000..ae2a2db
--- /dev/null
@@ -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 (file)
index 0000000..e982416
--- /dev/null
@@ -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 (file)
index 0000000..d0d92a3
--- /dev/null
@@ -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 (file)
index 0000000..d4e2272
--- /dev/null
@@ -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 (file)
index 0000000..85b5350
--- /dev/null
@@ -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 (file)
index 0000000..032a0ac
--- /dev/null
@@ -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 (file)
index 0000000..c05edb3
--- /dev/null
@@ -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 (file)
index 0000000..5d0c62f
--- /dev/null
@@ -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 (file)
index 0000000..be9fb35
--- /dev/null
@@ -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 (file)
index 0000000..994d6aa
--- /dev/null
@@ -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 (file)
index 0000000..5425ede
--- /dev/null
@@ -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 (file)
index 0000000..f8a4f63
--- /dev/null
@@ -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 (file)
index 0000000..97efe45
--- /dev/null
@@ -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 (file)
index 0000000..2ac0f3f
--- /dev/null
@@ -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 (file)
index 0000000..d0ea538
--- /dev/null
@@ -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| 
index 698b6a6b614583e595fe63550596aef894384149..3a3632a1969a6ac63c1f59051d59307c0834e1ae 100644 (file)
@@ -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 <F2> <Cmd>call setline(1, repeat('z', 30))<CR>
+    inoremap <F3> <Cmd>call setline(1, 'foo')<CR>
+    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, "\<F2>")
+  call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_03', {})
+  call term_sendkeys(buf, "\<F3>")
+  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, "\<Esc>")
+  call TermWait(buf, 50)
+  call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_06', {})
+
+  call term_sendkeys(buf, ":silent undo | echo\<CR>")
+  call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_01', {})
+  call term_sendkeys(buf, ":source samples/matchparen.vim\<CR>")
+  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, "\<Esc>")
+  call TermWait(buf, 50)
+  call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_10', {})
+
+  call term_sendkeys(buf, ":silent undo | echo\<CR>")
+  call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_01', {})
+  call term_sendkeys(buf, "f(azz\<CR>zz\<Esc>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, "\<Esc>")
+  call TermWait(buf, 50)
+  call VerifyScreenDump(buf, 'Test_change_wrapped_line_cpo_dollar_15', {})
+
+  call StopVimInTerminal(buf)
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab
index efe10008672226b3ae1a0676a3413cf014e9c251..ef98c1696eb44161fa871bc6163d58d699da000e 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1888,
 /**/
     1887,
 /**/