summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-03-16 21:42:16 +0100
committerBram Moolenaar <Bram@vim.org>2013-03-16 21:42:16 +0100
commitb897871ce9a4a6bd033bfe127a83eb6348361739 (patch)
tree75aeb62bd0fc12d4afe3dcb7a0a7adbebc166661
parenta5be25e1dbb6d129cb7d1efb5c73141a51836e06 (diff)
downloadvim-git-b897871ce9a4a6bd033bfe127a83eb6348361739.tar.gz
updated for version 7.3.865v7.3.865
Problem: Mouse position may be wrong. Solution: Let vungetc() restore the mouse position.
-rw-r--r--src/getchar.c12
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/getchar.c b/src/getchar.c
index c6d9492eb..d3d50e925 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -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
}
/*
diff --git a/src/version.c b/src/version.c
index 7c5f362b7..740e84159 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 865,
+/**/
864,
/**/
863,