summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0082
blob: 57ff29d5cc1adaf0b5b14fd092e6d76b6584ac47 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0082
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.0082
Problem:    In terminal window, typing : at more prompt, inserts ':' instead
            of starting another Ex command.
Solution:   Add skip_term_loop and set it when putting ':' in the typeahead
            buffer.
Files:	    src/globals.h, src/main.c, src/message.c


*** ../vim-8.1.0081/src/globals.h	2018-05-22 20:35:13.558009273 +0200
--- src/globals.h	2018-06-19 17:38:48.904146780 +0200
***************
*** 371,376 ****
--- 371,381 ----
  #  endif
  # endif
  #endif
+ #ifdef FEAT_TERMINAL
+ 		// When TRUE skip calling terminal_loop() once.  Used when
+ 		// typing ':' at the more prompt.
+ EXTERN int	skip_term_loop INIT(= FALSE);
+ #endif
  #ifdef FEAT_GUI
  EXTERN char_u	*use_gvimrc INIT(= NULL);	/* "-U" cmdline argument */
  #endif
*** ../vim-8.1.0081/src/main.c	2018-05-05 15:04:42.000000000 +0200
--- src/main.c	2018-06-19 17:34:55.649828513 +0200
***************
*** 1339,1345 ****
  #ifdef FEAT_TERMINAL
  	    if (term_use_loop()
  		    && oa.op_type == OP_NOP && oa.regname == NUL
! 		    && !VIsual_active)
  	    {
  		/* If terminal_loop() returns OK we got a key that is handled
  		 * in Normal model.  With FAIL we first need to position the
--- 1339,1346 ----
  #ifdef FEAT_TERMINAL
  	    if (term_use_loop()
  		    && oa.op_type == OP_NOP && oa.regname == NUL
! 		    && !VIsual_active
! 		    && !skip_term_loop)
  	    {
  		/* If terminal_loop() returns OK we got a key that is handled
  		 * in Normal model.  With FAIL we first need to position the
***************
*** 1349,1355 ****
--- 1350,1361 ----
  	    }
  	    else
  #endif
+ 	    {
+ #ifdef FEAT_TERMINAL
+ 		skip_term_loop = FALSE;
+ #endif
  		normal_cmd(&oa, TRUE);
+ 	    }
  	}
      }
  }
***************
*** 3320,3326 ****
      main_msg(_("-dev <device>\t\tUse <device> for I/O"));
  #endif
  #ifdef FEAT_ARABIC
!     main_msg(_("-A\t\t\tstart in Arabic mode"));
  #endif
  #ifdef FEAT_RIGHTLEFT
      main_msg(_("-H\t\t\tStart in Hebrew mode"));
--- 3326,3332 ----
      main_msg(_("-dev <device>\t\tUse <device> for I/O"));
  #endif
  #ifdef FEAT_ARABIC
!     main_msg(_("-A\t\t\tStart in Arabic mode"));
  #endif
  #ifdef FEAT_RIGHTLEFT
      main_msg(_("-H\t\t\tStart in Hebrew mode"));
*** ../vim-8.1.0081/src/message.c	2018-05-22 20:35:13.562009272 +0200
--- src/message.c	2018-06-19 17:39:40.111793123 +0200
***************
*** 1219,1224 ****
--- 1219,1227 ----
  	    cmdline_row = msg_row;
  	skip_redraw = TRUE;	    /* skip redraw once */
  	do_redraw = FALSE;
+ #ifdef FEAT_TERMINAL
+ 	skip_term_loop = TRUE;
+ #endif
      }
  
      /*
***************
*** 2827,2832 ****
--- 2830,2838 ----
  		/* Since got_int is set all typeahead will be flushed, but we
  		 * want to keep this ':', remember that in a special way. */
  		typeahead_noflush(':');
+ #ifdef FEAT_TERMINAL
+ 		skip_term_loop = TRUE;
+ #endif
  		cmdline_row = Rows - 1;		/* put ':' on this line */
  		skip_redraw = TRUE;		/* skip redraw once */
  		need_wait_return = FALSE;	/* don't wait in main() */
*** ../vim-8.1.0081/src/version.c	2018-06-19 17:27:50.085385875 +0200
--- src/version.c	2018-06-19 17:47:54.412556057 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     82,
  /**/

-- 
From "know your smileys":
 :^[/   mean-smiley-with-cigarette

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