summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0792
blob: 3c04fd126ccd87c118ef08681a56a0e649079162 (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0792
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.0792
Problem:    Popup menu is displayed on top of the cmdline window if it is
            opened from Insert completion. (Bjorn Linse)
Solution:   Remove the popup menu.  Restore the cursor position.
            (closes #3838)
Files:	    src/edit.c, src/ex_getln.c


*** ../vim-8.1.0791/src/edit.c	2019-01-19 17:43:03.401449251 +0100
--- src/edit.c	2019-01-22 22:04:03.005446245 +0100
***************
*** 8537,8542 ****
--- 8537,8543 ----
      ++no_u_sync;
      if (regname == '=')
      {
+ 	pos_T	curpos = curwin->w_cursor;
  # ifdef HAVE_INPUT_METHOD
  	int	im_on = im_get_status();
  # endif
***************
*** 8545,8552 ****
  	u_sync_once = 2;
  
  	regname = get_expr_register();
  # ifdef HAVE_INPUT_METHOD
! 	/* Restore the Input Method. */
  	if (im_on)
  	    im_set_active(TRUE);
  # endif
--- 8546,8557 ----
  	u_sync_once = 2;
  
  	regname = get_expr_register();
+ 
+ 	// Cursor may be moved back a column.
+ 	curwin->w_cursor = curpos;
+ 	check_cursor();
  # ifdef HAVE_INPUT_METHOD
! 	// Restore the Input Method.
  	if (im_on)
  	    im_set_active(TRUE);
  # endif
*** ../vim-8.1.0791/src/ex_getln.c	2019-01-19 17:43:03.409449198 +0100
--- src/ex_getln.c	2019-01-22 21:52:42.526460299 +0100
***************
*** 7268,7273 ****
--- 7268,7277 ----
      /* Don't execute autocommands while creating the window. */
      block_autocmds();
  
+     // When using completion in Insert mode with <C-R>=<C-F> one can open the
+     // command line window, but we don't want the popup menu then.
+     pum_undisplay();
+ 
      /* don't use a new tab page */
      cmdmod.tab = 0;
      cmdmod.noswapfile = 1;
*** ../vim-8.1.0791/src/version.c	2019-01-22 21:45:36.553678901 +0100
--- src/version.c	2019-01-22 22:07:18.600017151 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     792,
  /**/

-- 
FIRST HEAD:  Oh! quick! get the sword out I want to cut his head off.
THIRD HEAD:  Oh, cut your own head off.
SECOND HEAD: Yes - do us all a favour.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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    ///