]> granicus.if.org Git - vim/commitdiff
patch 8.2.1072: missing libvterm test v8.2.1072
authorBram Moolenaar <Bram@vim.org>
Sat, 27 Jun 2020 16:13:10 +0000 (18:13 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 27 Jun 2020 16:13:10 +0000 (18:13 +0200)
Problem:    Missing libvterm test.
Solution:   Sync with libvterm revision 768.

src/libvterm/src/state.c
src/libvterm/t/63screen_resize.test
src/version.c

index 30438efe820f1dc5d1a9eabd897e70ec7439e556..4fe3d7d20b6fde7d95c4e3b65d91471fb51c41b3 100644 (file)
@@ -1844,14 +1844,14 @@ static int on_resize(int rows, int cols, void *user)
     state->pos.col++;
   }
 
-  if(state->pos.row >= rows)
-    state->pos.row = rows - 1;
   if(state->pos.row < 0)
     state->pos.row = 0;
-  if(state->pos.col >= cols)
-    state->pos.col = cols - 1;
+  if(state->pos.row >= rows)
+    state->pos.row = rows - 1;
   if(state->pos.col < 0)
     state->pos.col = 0;
+  if(state->pos.col >= cols)
+    state->pos.col = cols - 1;
 
   updatecursor(state, &oldpos, 1);
 
index 87932f66d4c855b734513e8a336104ab770e32b2..87b88d64e06318298a0643ee152f80232c529299 100644 (file)
@@ -69,6 +69,22 @@ RESIZE 24,80
   ?screen_chars 22,0,23,10 = "Line 25"
   ?cursor = 23,0
 
+!Resize shorter does not send the cursor to a negative row
+# See also https://github.com/vim/vim/pull/6141
+RESET
+WANTSCREEN -b
+RESIZE 25,80
+WANTSCREEN b
+PUSH "\e[24HLine 24\r\nLine 25\e[H"
+  ?cursor = 0,0
+RESIZE 20,80
+  sb_pushline 80 =
+  sb_pushline 80 =
+  sb_pushline 80 =
+  sb_pushline 80 =
+  sb_pushline 80 =
+  ?cursor = 0,0
+
 !Resize taller attempts to pop scrollback
 RESET
 WANTSCREEN -b
index 6c8e5e0418669b5abf483b2ef44fc86608aaa3c8..51a93365f14805756a8a08f70e5af5b38296c52d 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1072,
 /**/
     1071,
 /**/