]> granicus.if.org Git - vim/commitdiff
patch 8.2.1164: text cleared by checking terminal properties not redrawn v8.2.1164
authorBram Moolenaar <Bram@vim.org>
Wed, 8 Jul 2020 21:09:28 +0000 (23:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 8 Jul 2020 21:09:28 +0000 (23:09 +0200)
Problem:    Text cleared by checking terminal properties not redrawn. (Alexey
            Radkov)
Solution:   Mark the screen characters as invalid. (closes #6422)

src/proto/screen.pro
src/screen.c
src/term.c
src/version.c

index 919bd419b05419e44da9ee16d76c12a8e4363952..3f475ec12c56842e67e13b291bf84463aa2ab280 100644 (file)
@@ -31,6 +31,7 @@ int screen_valid(int doclear);
 void screenalloc(int doclear);
 void free_screenlines(void);
 void screenclear(void);
+void line_was_clobbered(int screen_lnum);
 int can_clear(char_u *p);
 void screen_start(void);
 void windgoto(int row, int col);
index 01d6257b7cb345d1799833e8a4b4bf4651a6f1a7..0d65b4bbdc3ffe698355c2fa172ef8d1703313ed 100644 (file)
@@ -2981,6 +2981,16 @@ lineinvalid(unsigned off, int width)
     (void)vim_memset(ScreenAttrs + off, -1, (size_t)width * sizeof(sattr_T));
 }
 
+/*
+ * To be called when characters were sent to the terminal directly, outputting
+ * test on "screen_lnum".
+ */
+    void
+line_was_clobbered(int screen_lnum)
+{
+    lineinvalid(LineOffset[screen_lnum], (int)Columns);
+}
+
 /*
  * Copy part of a Screenline for vertically split window "wp".
  */
index 3bda87ccccec05c09fc38071201f72ba7f9d1858..07acc11b2acbc35208376882a59ea8d47a23e83a 100644 (file)
@@ -3732,6 +3732,7 @@ check_terminal_behavior(void)
        screen_stop_highlight();
        term_windgoto(1, 0);
        out_str((char_u *)"  ");
+       line_was_clobbered(1);
     }
 
     if (xcc_status.tr_progress == STATUS_GET)
@@ -3761,6 +3762,7 @@ check_terminal_behavior(void)
        screen_stop_highlight();
        term_windgoto(2, 0);
        out_str((char_u *)"           ");
+       line_was_clobbered(2);
     }
 
     if (did_send)
index 91da9bb9d8616c033f6b91df1d5751c2c68d301a..f3e023f9724ec635014d55f963a9448cf52fcb89 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1164,
 /**/
     1163,
 /**/