summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0065
blob: 042a3c4ec9217a1c9258dad9421234cc016d655c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0065
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0065 (after 8.1.0062)
Problem:    Balloon displayed at the wrong position.
Solution:   Do not reposition the popup menu at the cursor position.
Files:	    src/popupmnu.c


*** ../vim-8.1.0064/src/popupmnu.c	2018-06-17 14:47:50.649309059 +0200
--- src/popupmnu.c	2018-06-17 17:06:35.634554918 +0200
***************
*** 29,34 ****
--- 29,35 ----
  static int pum_row;			/* top row of pum */
  static int pum_col;			/* left column of pum */
  
+ static win_T *pum_window = NULL;
  static int pum_win_row;
  static int pum_win_height;
  static int pum_win_col;
***************
*** 110,115 ****
--- 111,117 ----
  
  	// Remember the essential parts of the window position and size, so we
  	// can decide when to reposition the popup menu.
+ 	pum_window = curwin;
  	pum_win_row = curwin->w_wrow + W_WINROW(curwin);
  	pum_win_height = curwin->w_height;
  	pum_win_col = curwin->w_wincol;
***************
*** 846,855 ****
      if (!pum_visible())
  	return;  // nothing to do
  
!     if (pum_win_row == curwin->w_wrow + W_WINROW(curwin)
! 	    && pum_win_height == curwin->w_height
! 	    && pum_win_col == curwin->w_wincol
! 	    && pum_win_width == curwin->w_width)
      {
  	// window position didn't change, redraw in the same position
  	pum_redraw();
--- 848,858 ----
      if (!pum_visible())
  	return;  // nothing to do
  
!     if (pum_window != curwin
! 	    || (pum_win_row == curwin->w_wrow + W_WINROW(curwin)
! 		&& pum_win_height == curwin->w_height
! 		&& pum_win_col == curwin->w_wincol
! 		&& pum_win_width == curwin->w_width))
      {
  	// window position didn't change, redraw in the same position
  	pum_redraw();
***************
*** 912,917 ****
--- 915,923 ----
      pum_width = Columns - pum_col;
      if (pum_width > pum_base_width + 1)
  	pum_width = pum_base_width + 1;
+ 
+     // Do not redraw at cursor position.
+     pum_window = NULL;
  }
  
  # endif
*** ../vim-8.1.0064/src/version.c	2018-06-17 16:23:29.341140642 +0200
--- src/version.c	2018-06-17 17:09:52.429048636 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     65,
  /**/

-- 
Time is money.  Especially if you make clocks.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///