summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0064
blob: 66395247adfef8155517fca75d622bc50ac1217b (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
91
92
93
94
95
96
97
98
99
100
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0064
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.0064
Problem:    Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution:   Set restart_edit to 'A' and check for it.
Files:	    src/edit.c, src/window.c, src/screen.c


*** ../vim-8.1.0063/src/edit.c	2018-06-16 15:32:34.460024472 +0200
--- src/edit.c	2018-06-17 16:11:15.377294192 +0200
***************
*** 1179,1185 ****
  		// In a prompt window CTRL-W is used for window commands.
  		// Use Shift-CTRL-W to delete a word.
  		stuffcharReadbuff(Ctrl_W);
! 		restart_edit = 'i';
  		nomove = TRUE;
  		count = 0;
  		goto doESCkey;
--- 1179,1185 ----
  		// In a prompt window CTRL-W is used for window commands.
  		// Use Shift-CTRL-W to delete a word.
  		stuffcharReadbuff(Ctrl_W);
! 		restart_edit = 'A';
  		nomove = TRUE;
  		count = 0;
  		goto doESCkey;
*** ../vim-8.1.0063/src/window.c	2018-06-12 16:49:26.366028607 +0200
--- src/window.c	2018-06-17 16:18:31.098815622 +0200
***************
*** 2114,2119 ****
--- 2114,2121 ----
      // When leaving a prompt window stop Insert mode and perhaps restart
      // it when entering that window again.
      win->w_buffer->b_prompt_insert = restart_edit;
+     if (restart_edit != 0 && mode_displayed)
+ 	clear_cmdline = TRUE;		/* unshow mode later */
      restart_edit = NUL;
  
      // When leaving the window (or closing the window) was done from a
*** ../vim-8.1.0063/src/screen.c	2018-06-17 14:47:50.657309005 +0200
--- src/screen.c	2018-06-17 16:12:28.936871827 +0200
***************
*** 10263,10269 ****
  
      do_mode = ((p_smd && msg_silent == 0)
  	    && ((State & INSERT)
! 		|| restart_edit
  		|| VIsual_active));
      if (do_mode || reg_recording != 0)
      {
--- 10263,10269 ----
  
      do_mode = ((p_smd && msg_silent == 0)
  	    && ((State & INSERT)
! 		|| restart_edit != NUL
  		|| VIsual_active));
      if (do_mode || reg_recording != 0)
      {
***************
*** 10370,10376 ****
  #endif
  		    MSG_PUTS_ATTR(_(" INSERT"), attr);
  		}
! 		else if (restart_edit == 'I')
  		    MSG_PUTS_ATTR(_(" (insert)"), attr);
  		else if (restart_edit == 'R')
  		    MSG_PUTS_ATTR(_(" (replace)"), attr);
--- 10370,10376 ----
  #endif
  		    MSG_PUTS_ATTR(_(" INSERT"), attr);
  		}
! 		else if (restart_edit == 'I' || restart_edit == 'A')
  		    MSG_PUTS_ATTR(_(" (insert)"), attr);
  		else if (restart_edit == 'R')
  		    MSG_PUTS_ATTR(_(" (replace)"), attr);
*** ../vim-8.1.0063/src/version.c	2018-06-17 15:01:00.580427088 +0200
--- src/version.c	2018-06-17 16:23:00.305303242 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     64,
  /**/

-- 
I'm trying to be an optimist, but I don't think it'll work.

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