]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.865 v7.3.865
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Mar 2013 20:42:16 +0000 (21:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Mar 2013 20:42:16 +0000 (21:42 +0100)
Problem:    Mouse position may be wrong.
Solution:   Let vungetc() restore the mouse position.

src/getchar.c
src/version.c

index c6d9492ebd4dbe8dbe78e7ae5a8d7d80f4c654d3..d3d50e92541ba87ebf787a32bb2d0df5f93a91ac 100644 (file)
@@ -1337,6 +1337,10 @@ save_typebuf()
 
 static int old_char = -1;      /* character put back by vungetc() */
 static int old_mod_mask;       /* mod_mask for ungotten character */
+#ifdef FEAT_MOUSE
+static int old_mouse_row;      /* mouse_row related to old_char */
+static int old_mouse_col;      /* mouse_col related to old_char */
+#endif
 
 #if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO)
 
@@ -1567,6 +1571,10 @@ vgetc()
        c = old_char;
        old_char = -1;
        mod_mask = old_mod_mask;
+#ifdef FEAT_MOUSE
+       mouse_row = old_mouse_row;
+       mouse_col = old_mouse_col;
+#endif
     }
     else
     {
@@ -1877,6 +1885,10 @@ vungetc(c)       /* unget one character (can only be done once!) */
 {
     old_char = c;
     old_mod_mask = mod_mask;
+#ifdef FEAT_MOUSE
+    old_mouse_row = mouse_row;
+    old_mouse_col = mouse_col;
+#endif
 }
 
 /*
index 7c5f362b790e140a5c05a6462c3afa07314053d0..740e84159fd2f778a27686a3c8f5b88e6266979f 100644 (file)
@@ -728,6 +728,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    865,
 /**/
     864,
 /**/