]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.168
- updated to 7.1.285
[packages/vim.git] / 7.1.168
1 To: vim-dev@vim.org
2 Subject: Patch 7.1.168 (extra)
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.168 (extra)
11 Problem:    Win32 GUI: Since patch 7.1.095, when the Vim window does not have
12             focus, clicking in it doesn't position the cursor. (Juergen
13             Kraemer)
14 Solution:   Don't reset s_button_pending just after receiving focus.
15 Files:      src/gui_w48.c
16
17
18 *** ../vim-7.1.167/src/gui_w48.c        Tue Nov 20 17:21:28 2007
19 --- src/gui_w48.c       Mon Dec  3 22:13:16 2007
20 ***************
21 *** 290,295 ****
22 --- 290,300 ----
23   
24   /* Local variables */
25   static int            s_button_pending = -1;
26
27 + /* s_getting_focus is set when we got focus but didn't see mouse-up event yet,
28 +  * so don't reset s_button_pending. */
29 + static int            s_getting_focus = FALSE;
30
31   static int            s_x_pending;
32   static int            s_y_pending;
33   static UINT           s_kFlags_pending;
34 ***************
35 *** 671,676 ****
36 --- 676,683 ----
37   {
38       int vim_modifiers = 0x0;
39   
40 +     s_getting_focus = FALSE;
41
42       if (keyFlags & MK_SHIFT)
43         vim_modifiers |= MOUSE_SHIFT;
44       if (keyFlags & MK_CONTROL)
45 ***************
46 *** 792,797 ****
47 --- 799,805 ----
48   {
49       int button;
50   
51 +     s_getting_focus = FALSE;
52       if (s_button_pending > -1)
53       {
54         /* Delayed action for mouse down event */
55 ***************
56 *** 1951,1958 ****
57             allow_scrollbar = FALSE;
58   
59             /* Clear pending mouse button, the release event may have been
60 !            * taken by the dialog window. */
61 !           s_button_pending = -1;
62   
63             return OK;
64         }
65 --- 1959,1968 ----
66             allow_scrollbar = FALSE;
67   
68             /* Clear pending mouse button, the release event may have been
69 !            * taken by the dialog window.  But don't do this when getting
70 !            * focus, we need the mouse-up event then. */
71 !           if (!s_getting_focus)
72 !               s_button_pending = -1;
73   
74             return OK;
75         }
76 ***************
77 *** 2702,2707 ****
78 --- 2712,2718 ----
79       HWND hwndOldFocus)
80   {
81       gui_focus_change(TRUE);
82 +     s_getting_focus = TRUE;
83       (void)MyWindowProc(hwnd, WM_SETFOCUS, (WPARAM)hwndOldFocus, 0);
84   }
85   
86 ***************
87 *** 2711,2716 ****
88 --- 2722,2728 ----
89       HWND hwndNewFocus)
90   {
91       gui_focus_change(FALSE);
92 +     s_getting_focus = FALSE;
93       (void)MyWindowProc(hwnd, WM_KILLFOCUS, (WPARAM)hwndNewFocus, 0);
94   }
95   
96 *** ../vim-7.1.167/src/version.c        Mon Dec  3 21:31:56 2007
97 --- src/version.c       Mon Dec  3 22:16:32 2007
98 ***************
99 *** 668,669 ****
100 --- 668,671 ----
101   {   /* Add new patch number below this line */
102 + /**/
103 +     168,
104   /**/
105
106 -- 
107 Rule #1: Don't give somebody a tool that he's going to hurt himself with.
108
109  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
110 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
111 \\\        download, build and distribute -- http://www.A-A-P.org        ///
112  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.038951 seconds and 3 git commands to generate.