Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 4 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 16, 2013
Bram Moolenaar updated for version 7.3.862
Problem:    Dragging the status line can be slow.
Solution:   Look ahead and drop the drag event if there is a next one.
03b298b
Bram Moolenaar Added tag v7-3-862 for changeset dd4f3ceb5d86 72b41a8
Bram Moolenaar updated for version 7.3.863
Problem:    Problem with 'ambiwidth' detection for ANSI terminal.
Solution:   Work around not recognizing a term response. (Hayaki Saito)
509ab2f
Bram Moolenaar Added tag v7-3-863 for changeset 5c0652f455c9 2e6b124
View
2  .hgtags
@@ -2198,3 +2198,5 @@ fb533fb6c015f40a3b1301c0c876c35665b0d6ef v7-3-856
ecf21be84def6033137d168e0a66500c29aeffec v7-3-859
6ce32844727d8d04e8dc91310d0a4118d81aa161 v7-3-860
6fe728bf165e9b6974ef47e86d98b0eb14ce21f3 v7-3-861
+dd4f3ceb5d86f8367d4cfd6fdc898e493c6d0aad v7-3-862
+5c0652f455c9f2ae72790a782fe5b5fd1a0e857c v7-3-863
View
22 src/eval.c
@@ -11238,27 +11238,7 @@ f_getchar(argvars, rettv)
rettv->vval.v_string = vim_strsave(temp);
#ifdef FEAT_MOUSE
- if (n == K_LEFTMOUSE
- || n == K_LEFTMOUSE_NM
- || n == K_LEFTDRAG
- || n == K_LEFTRELEASE
- || n == K_LEFTRELEASE_NM
- || n == K_MIDDLEMOUSE
- || n == K_MIDDLEDRAG
- || n == K_MIDDLERELEASE
- || n == K_RIGHTMOUSE
- || n == K_RIGHTDRAG
- || n == K_RIGHTRELEASE
- || n == K_X1MOUSE
- || n == K_X1DRAG
- || n == K_X1RELEASE
- || n == K_X2MOUSE
- || n == K_X2DRAG
- || n == K_X2RELEASE
- || n == K_MOUSELEFT
- || n == K_MOUSERIGHT
- || n == K_MOUSEDOWN
- || n == K_MOUSEUP)
+ if (is_mouse_key(n))
{
int row = mouse_row;
int col = mouse_col;
View
57 src/misc1.c
@@ -3288,6 +3288,38 @@ ask_yesno(str, direct)
return r;
}
+#if defined(FEAT_MOUSE) || defined(PROTO)
+/*
+ * Return TRUE if "c" is a mouse key.
+ */
+ int
+is_mouse_key(c)
+ int c;
+{
+ return c == K_LEFTMOUSE
+ || c == K_LEFTMOUSE_NM
+ || c == K_LEFTDRAG
+ || c == K_LEFTRELEASE
+ || c == K_LEFTRELEASE_NM
+ || c == K_MIDDLEMOUSE
+ || c == K_MIDDLEDRAG
+ || c == K_MIDDLERELEASE
+ || c == K_RIGHTMOUSE
+ || c == K_RIGHTDRAG
+ || c == K_RIGHTRELEASE
+ || c == K_MOUSEDOWN
+ || c == K_MOUSEUP
+ || c == K_MOUSELEFT
+ || c == K_MOUSERIGHT
+ || c == K_X1MOUSE
+ || c == K_X1DRAG
+ || c == K_X1RELEASE
+ || c == K_X2MOUSE
+ || c == K_X2DRAG
+ || c == K_X2RELEASE;
+}
+#endif
+
/*
* Get a key stroke directly from the user.
* Ignores mouse clicks and scrollbar events, except a click for the left
@@ -3373,31 +3405,10 @@ get_keystroke()
n = TO_SPECIAL(buf[1], buf[2]);
if (buf[1] == KS_MODIFIER
|| n == K_IGNORE
-#ifdef FEAT_MOUSE
- || n == K_LEFTMOUSE_NM
- || n == K_LEFTDRAG
- || n == K_LEFTRELEASE
- || n == K_LEFTRELEASE_NM
- || n == K_MIDDLEMOUSE
- || n == K_MIDDLEDRAG
- || n == K_MIDDLERELEASE
- || n == K_RIGHTMOUSE
- || n == K_RIGHTDRAG
- || n == K_RIGHTRELEASE
- || n == K_MOUSEDOWN
- || n == K_MOUSEUP
- || n == K_MOUSELEFT
- || n == K_MOUSERIGHT
- || n == K_X1MOUSE
- || n == K_X1DRAG
- || n == K_X1RELEASE
- || n == K_X2MOUSE
- || n == K_X2DRAG
- || n == K_X2RELEASE
-# ifdef FEAT_GUI
+ || (is_mouse_key(n) && n != K_LEFTMOUSE)
+#ifdef FEAT_GUI
|| n == K_VER_SCROLLBAR
|| n == K_HOR_SCROLLBAR
-# endif
#endif
)
{
View
26 src/normal.c
@@ -2443,7 +2443,31 @@ do_mouse(oap, c, dir, count, fixindent)
return FALSE;
}
- which_button = get_mouse_button(KEY2TERMCAP1(c), &is_click, &is_drag);
+ for (;;)
+ {
+ which_button = get_mouse_button(KEY2TERMCAP1(c), &is_click, &is_drag);
+ if (is_drag)
+ {
+ /* If the next character is the same mouse event then use that
+ * one. Speeds up dragging the status line. */
+ if (vpeekc() != NUL)
+ {
+ int nc;
+ int save_mouse_row = mouse_row;
+ int save_mouse_col = mouse_col;
+
+ /* Need to get the character, peeking doesn't get the actual
+ * one. */
+ nc = safe_vgetc();
+ if (c == nc)
+ continue;
+ vungetc(nc);
+ mouse_row = save_mouse_row;
+ mouse_col = save_mouse_col;
+ }
+ }
+ break;
+ }
#ifdef FEAT_MOUSESHAPE
/* May have stopped dragging the status or separator line. The pointer is
View
1  src/proto/misc1.pro
@@ -42,6 +42,7 @@ void unchanged __ARGS((buf_T *buf, int ff));
void check_status __ARGS((buf_T *buf));
void change_warning __ARGS((int col));
int ask_yesno __ARGS((char_u *str, int direct));
+int is_mouse_key __ARGS((int c));
int get_keystroke __ARGS((void));
int get_number __ARGS((int colon, int *mouse_used));
int prompt_for_number __ARGS((int *mouse_used));
View
11 src/term.c
@@ -3926,8 +3926,7 @@ check_termcode(max_offset, buf, bufsize, buflen)
* Check at several positions in typebuf.tb_buf[], to catch something like
* "x<Up>" that can be mapped. Stop at max_offset, because characters
* after that cannot be used for mapping, and with @r commands
- * typebuf.tb_buf[]
- * can become very long.
+ * typebuf.tb_buf[] can become very long.
* This is used often, KEEP IT FAST!
*/
for (offset = 0; offset < max_offset; ++offset)
@@ -4098,7 +4097,11 @@ check_termcode(max_offset, buf, bufsize, buflen)
#ifdef FEAT_TERMRESPONSE
if (key_name[0] == NUL
/* URXVT mouse uses <ESC>[#;#;#M, but we are matching <ESC>[ */
- || key_name[0] == KS_URXVT_MOUSE)
+ || key_name[0] == KS_URXVT_MOUSE
+# ifdef FEAT_MBYTE
+ || u7_status == U7_SENT
+# endif
+ )
{
/* Check for some responses from terminal start with "<Esc>[" or
* CSI.
@@ -4129,7 +4132,7 @@ check_termcode(max_offset, buf, bufsize, buflen)
#ifdef FEAT_MBYTE
/* eat it when it has 2 arguments and ends in 'R' */
- if (u7_status == U7_SENT && j == 1 && tp[i] == 'R')
+ if (j == 1 && tp[i] == 'R')
{
char *p = NULL;
View
4 src/version.c
@@ -729,6 +729,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 863,
+/**/
+ 862,
+/**/
861,
/**/
860,

No commit comments for this range

Something went wrong with that request. Please try again.