]> granicus.if.org Git - vim/commitdiff
patch 8.0.0021 v8.0.0021
authorBram Moolenaar <Bram@vim.org>
Sun, 2 Oct 2016 21:09:31 +0000 (23:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 2 Oct 2016 21:09:31 +0000 (23:09 +0200)
Problem:    In the GUI when redrawing the cursor it may be on the second half
            of a double byte character.
Solution:   Correct the cursor column. (Yasuhiro Matsumoto)

src/screen.c
src/version.c

index 4604ec728c7bf424deef2abc2254a6e5c7a59db8..5ebca09804aa16e5b9c5bec2770dbd224acce4df 100644 (file)
@@ -765,6 +765,9 @@ update_screen(int type)
             * uses that. */
            gui.col = gui_cursor_col;
            gui.row = gui_cursor_row;
+# ifdef FEAT_MBYTE
+           gui.col = mb_fix_col(gui.col, gui.row);
+# endif
            gui_update_cursor(FALSE, FALSE);
            screen_cur_col = gui.col;
            screen_cur_row = gui.row;
index b74ad2f4d25171957245196cc95b03f21d2d963d..dc8e9cf3531a5a7371f82ffdbaad5b1119d72db1 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    21,
 /**/
     20,
 /**/