|
Karsten Hopp |
6e5bc6 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
6e5bc6 |
Subject: Patch 7.3.862
|
|
Karsten Hopp |
6e5bc6 |
Fcc: outbox
|
|
Karsten Hopp |
6e5bc6 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
6e5bc6 |
Mime-Version: 1.0
|
|
Karsten Hopp |
6e5bc6 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
6e5bc6 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
6e5bc6 |
------------
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
Patch 7.3.862
|
|
Karsten Hopp |
6e5bc6 |
Problem: Dragging the status line can be slow.
|
|
Karsten Hopp |
6e5bc6 |
Solution: Look ahead and drop the drag event if there is a next one.
|
|
Karsten Hopp |
6e5bc6 |
Files: src/eval.c, src/misc1.c, src/proto/misc1.pro, src/normal.c
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
*** ../vim-7.3.861/src/eval.c 2013-02-26 21:43:28.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
--- src/eval.c 2013-03-16 14:02:36.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
***************
|
|
Karsten Hopp |
6e5bc6 |
*** 11238,11264 ****
|
|
Karsten Hopp |
6e5bc6 |
rettv->vval.v_string = vim_strsave(temp);
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
#ifdef FEAT_MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! if (n == K_LEFTMOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTMOUSE_NM
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTDRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTRELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTRELEASE_NM
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MIDDLEMOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MIDDLEDRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MIDDLERELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_RIGHTMOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_RIGHTDRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_RIGHTRELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X1MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X1DRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X1RELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X2MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X2DRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X2RELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSELEFT
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSERIGHT
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSEDOWN
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSEUP)
|
|
Karsten Hopp |
6e5bc6 |
{
|
|
Karsten Hopp |
6e5bc6 |
int row = mouse_row;
|
|
Karsten Hopp |
6e5bc6 |
int col = mouse_col;
|
|
Karsten Hopp |
6e5bc6 |
--- 11238,11244 ----
|
|
Karsten Hopp |
6e5bc6 |
rettv->vval.v_string = vim_strsave(temp);
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
#ifdef FEAT_MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! if (is_mouse_key(n))
|
|
Karsten Hopp |
6e5bc6 |
{
|
|
Karsten Hopp |
6e5bc6 |
int row = mouse_row;
|
|
Karsten Hopp |
6e5bc6 |
int col = mouse_col;
|
|
Karsten Hopp |
6e5bc6 |
*** ../vim-7.3.861/src/misc1.c 2013-03-13 17:01:47.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
--- src/misc1.c 2013-03-16 14:08:05.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
***************
|
|
Karsten Hopp |
6e5bc6 |
*** 3288,3293 ****
|
|
Karsten Hopp |
6e5bc6 |
--- 3288,3325 ----
|
|
Karsten Hopp |
6e5bc6 |
return r;
|
|
Karsten Hopp |
6e5bc6 |
}
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
+ #if defined(FEAT_MOUSE) || defined(PROTO)
|
|
Karsten Hopp |
6e5bc6 |
+ /*
|
|
Karsten Hopp |
6e5bc6 |
+ * Return TRUE if "c" is a mouse key.
|
|
Karsten Hopp |
6e5bc6 |
+ */
|
|
Karsten Hopp |
6e5bc6 |
+ int
|
|
Karsten Hopp |
6e5bc6 |
+ is_mouse_key(c)
|
|
Karsten Hopp |
6e5bc6 |
+ int c;
|
|
Karsten Hopp |
6e5bc6 |
+ {
|
|
Karsten Hopp |
6e5bc6 |
+ return c == K_LEFTMOUSE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_LEFTMOUSE_NM
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_LEFTDRAG
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_LEFTRELEASE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_LEFTRELEASE_NM
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MIDDLEMOUSE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MIDDLEDRAG
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MIDDLERELEASE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_RIGHTMOUSE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_RIGHTDRAG
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_RIGHTRELEASE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MOUSEDOWN
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MOUSEUP
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MOUSELEFT
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_MOUSERIGHT
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_X1MOUSE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_X1DRAG
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_X1RELEASE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_X2MOUSE
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_X2DRAG
|
|
Karsten Hopp |
6e5bc6 |
+ || c == K_X2RELEASE;
|
|
Karsten Hopp |
6e5bc6 |
+ }
|
|
Karsten Hopp |
6e5bc6 |
+ #endif
|
|
Karsten Hopp |
6e5bc6 |
+
|
|
Karsten Hopp |
6e5bc6 |
/*
|
|
Karsten Hopp |
6e5bc6 |
* Get a key stroke directly from the user.
|
|
Karsten Hopp |
6e5bc6 |
* Ignores mouse clicks and scrollbar events, except a click for the left
|
|
Karsten Hopp |
6e5bc6 |
***************
|
|
Karsten Hopp |
6e5bc6 |
*** 3373,3403 ****
|
|
Karsten Hopp |
6e5bc6 |
n = TO_SPECIAL(buf[1], buf[2]);
|
|
Karsten Hopp |
6e5bc6 |
if (buf[1] == KS_MODIFIER
|
|
Karsten Hopp |
6e5bc6 |
|| n == K_IGNORE
|
|
Karsten Hopp |
6e5bc6 |
! #ifdef FEAT_MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTMOUSE_NM
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTDRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTRELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_LEFTRELEASE_NM
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MIDDLEMOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MIDDLEDRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MIDDLERELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_RIGHTMOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_RIGHTDRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_RIGHTRELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSEDOWN
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSEUP
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSELEFT
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_MOUSERIGHT
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X1MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X1DRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X1RELEASE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X2MOUSE
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X2DRAG
|
|
Karsten Hopp |
6e5bc6 |
! || n == K_X2RELEASE
|
|
Karsten Hopp |
6e5bc6 |
! # ifdef FEAT_GUI
|
|
Karsten Hopp |
6e5bc6 |
|| n == K_VER_SCROLLBAR
|
|
Karsten Hopp |
6e5bc6 |
|| n == K_HOR_SCROLLBAR
|
|
Karsten Hopp |
6e5bc6 |
- # endif
|
|
Karsten Hopp |
6e5bc6 |
#endif
|
|
Karsten Hopp |
6e5bc6 |
)
|
|
Karsten Hopp |
6e5bc6 |
{
|
|
Karsten Hopp |
6e5bc6 |
--- 3405,3414 ----
|
|
Karsten Hopp |
6e5bc6 |
n = TO_SPECIAL(buf[1], buf[2]);
|
|
Karsten Hopp |
6e5bc6 |
if (buf[1] == KS_MODIFIER
|
|
Karsten Hopp |
6e5bc6 |
|| n == K_IGNORE
|
|
Karsten Hopp |
6e5bc6 |
! || (is_mouse_key(n) && n != K_LEFTMOUSE)
|
|
Karsten Hopp |
6e5bc6 |
! #ifdef FEAT_GUI
|
|
Karsten Hopp |
6e5bc6 |
|| n == K_VER_SCROLLBAR
|
|
Karsten Hopp |
6e5bc6 |
|| n == K_HOR_SCROLLBAR
|
|
Karsten Hopp |
6e5bc6 |
#endif
|
|
Karsten Hopp |
6e5bc6 |
)
|
|
Karsten Hopp |
6e5bc6 |
{
|
|
Karsten Hopp |
6e5bc6 |
*** ../vim-7.3.861/src/proto/misc1.pro 2012-11-20 16:56:49.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
--- src/proto/misc1.pro 2013-03-16 14:02:33.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
***************
|
|
Karsten Hopp |
6e5bc6 |
*** 42,47 ****
|
|
Karsten Hopp |
6e5bc6 |
--- 42,48 ----
|
|
Karsten Hopp |
6e5bc6 |
void check_status __ARGS((buf_T *buf));
|
|
Karsten Hopp |
6e5bc6 |
void change_warning __ARGS((int col));
|
|
Karsten Hopp |
6e5bc6 |
int ask_yesno __ARGS((char_u *str, int direct));
|
|
Karsten Hopp |
6e5bc6 |
+ int is_mouse_key __ARGS((int c));
|
|
Karsten Hopp |
6e5bc6 |
int get_keystroke __ARGS((void));
|
|
Karsten Hopp |
6e5bc6 |
int get_number __ARGS((int colon, int *mouse_used));
|
|
Karsten Hopp |
6e5bc6 |
int prompt_for_number __ARGS((int *mouse_used));
|
|
Karsten Hopp |
6e5bc6 |
*** ../vim-7.3.861/src/normal.c 2013-03-13 19:02:37.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
--- src/normal.c 2013-03-16 14:09:34.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
***************
|
|
Karsten Hopp |
6e5bc6 |
*** 2443,2449 ****
|
|
Karsten Hopp |
6e5bc6 |
return FALSE;
|
|
Karsten Hopp |
6e5bc6 |
}
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
! which_button = get_mouse_button(KEY2TERMCAP1(c), &is_click, &is_drag);
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
#ifdef FEAT_MOUSESHAPE
|
|
Karsten Hopp |
6e5bc6 |
/* May have stopped dragging the status or separator line. The pointer is
|
|
Karsten Hopp |
6e5bc6 |
--- 2443,2473 ----
|
|
Karsten Hopp |
6e5bc6 |
return FALSE;
|
|
Karsten Hopp |
6e5bc6 |
}
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
! for (;;)
|
|
Karsten Hopp |
6e5bc6 |
! {
|
|
Karsten Hopp |
6e5bc6 |
! which_button = get_mouse_button(KEY2TERMCAP1(c), &is_click, &is_drag);
|
|
Karsten Hopp |
6e5bc6 |
! if (is_drag)
|
|
Karsten Hopp |
6e5bc6 |
! {
|
|
Karsten Hopp |
6e5bc6 |
! /* If the next character is the same mouse event then use that
|
|
Karsten Hopp |
6e5bc6 |
! * one. Speeds up dragging the status line. */
|
|
Karsten Hopp |
6e5bc6 |
! if (vpeekc() != NUL)
|
|
Karsten Hopp |
6e5bc6 |
! {
|
|
Karsten Hopp |
6e5bc6 |
! int nc;
|
|
Karsten Hopp |
6e5bc6 |
! int save_mouse_row = mouse_row;
|
|
Karsten Hopp |
6e5bc6 |
! int save_mouse_col = mouse_col;
|
|
Karsten Hopp |
6e5bc6 |
!
|
|
Karsten Hopp |
6e5bc6 |
! /* Need to get the character, peeking doesn't get the actual
|
|
Karsten Hopp |
6e5bc6 |
! * one. */
|
|
Karsten Hopp |
6e5bc6 |
! nc = safe_vgetc();
|
|
Karsten Hopp |
6e5bc6 |
! if (c == nc)
|
|
Karsten Hopp |
6e5bc6 |
! continue;
|
|
Karsten Hopp |
6e5bc6 |
! vungetc(nc);
|
|
Karsten Hopp |
6e5bc6 |
! mouse_row = save_mouse_row;
|
|
Karsten Hopp |
6e5bc6 |
! mouse_col = save_mouse_col;
|
|
Karsten Hopp |
6e5bc6 |
! }
|
|
Karsten Hopp |
6e5bc6 |
! }
|
|
Karsten Hopp |
6e5bc6 |
! break;
|
|
Karsten Hopp |
6e5bc6 |
! }
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
#ifdef FEAT_MOUSESHAPE
|
|
Karsten Hopp |
6e5bc6 |
/* May have stopped dragging the status or separator line. The pointer is
|
|
Karsten Hopp |
6e5bc6 |
*** ../vim-7.3.861/src/version.c 2013-03-13 20:42:28.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
--- src/version.c 2013-03-16 14:18:36.000000000 +0100
|
|
Karsten Hopp |
6e5bc6 |
***************
|
|
Karsten Hopp |
6e5bc6 |
*** 730,731 ****
|
|
Karsten Hopp |
6e5bc6 |
--- 730,733 ----
|
|
Karsten Hopp |
6e5bc6 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
6e5bc6 |
+ /**/
|
|
Karsten Hopp |
6e5bc6 |
+ 862,
|
|
Karsten Hopp |
6e5bc6 |
/**/
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
--
|
|
Karsten Hopp |
6e5bc6 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
6e5bc6 |
53. To find out what time it is, you send yourself an e-mail and check the
|
|
Karsten Hopp |
6e5bc6 |
"Date:" field.
|
|
Karsten Hopp |
6e5bc6 |
|
|
Karsten Hopp |
6e5bc6 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
6e5bc6 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
6e5bc6 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
6e5bc6 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|