summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1204
blob: 4ccf57a654de64a0876f4761930c4245b529263a (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1204
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.1204
Problem:    Output of :command with address completion is not nice.
Solution:   Shorten the address completion names.
Files:	    src/ex_docmd.c, runtime/doc/map.txt


*** ../vim-8.1.1203/src/ex_docmd.c	2019-04-24 23:08:20.078079973 +0200
--- src/ex_docmd.c	2019-04-25 21:23:03.102569641 +0200
***************
*** 5915,5931 ****
  {
      int	    expand;
      char    *name;
  } addr_type_complete[] =
  {
!     {ADDR_ARGUMENTS, "arguments"},
!     {ADDR_LINES, "lines"},
!     {ADDR_LOADED_BUFFERS, "loaded_buffers"},
!     {ADDR_TABS, "tabs"},
!     {ADDR_BUFFERS, "buffers"},
!     {ADDR_WINDOWS, "windows"},
!     {ADDR_QUICKFIX, "quickfix"},
!     {ADDR_OTHER, "other"},
!     {-1, NULL}
  };
  #endif
  
--- 5915,5932 ----
  {
      int	    expand;
      char    *name;
+     char    *shortname;
  } addr_type_complete[] =
  {
!     {ADDR_ARGUMENTS, "arguments", "arg"},
!     {ADDR_LINES, "lines", "line"},
!     {ADDR_LOADED_BUFFERS, "loaded_buffers", "load"},
!     {ADDR_TABS, "tabs", "tab"},
!     {ADDR_BUFFERS, "buffers", "buf"},
!     {ADDR_WINDOWS, "windows", "win"},
!     {ADDR_QUICKFIX, "quickfix", "qf"},
!     {ADDR_OTHER, "other", "?"},
!     {-1, NULL, NULL}
  };
  #endif
  
***************
*** 6020,6026 ****
  
  	    /* Put out the title first time */
  	    if (!found)
! 		msg_puts_title(_("\n    Name              Args Address Complete   Definition"));
  	    found = TRUE;
  	    msg_putchar('\n');
  	    if (got_int)
--- 6021,6027 ----
  
  	    /* Put out the title first time */
  	    if (!found)
! 		msg_puts_title(_("\n    Name              Args Address Complete    Definition"));
  	    found = TRUE;
  	    msg_putchar('\n');
  	    if (got_int)
***************
*** 6101,6114 ****
  
  	    do {
  		IObuff[len++] = ' ';
! 	    } while (len < 9 - over);
  
  	    // Address Type
  	    for (j = 0; addr_type_complete[j].expand != -1; ++j)
  		if (addr_type_complete[j].expand != ADDR_LINES
  			&& addr_type_complete[j].expand == cmd->uc_addr_type)
  		{
! 		    STRCPY(IObuff + len, addr_type_complete[j].name);
  		    len += (int)STRLEN(IObuff + len);
  		    break;
  		}
--- 6102,6115 ----
  
  	    do {
  		IObuff[len++] = ' ';
! 	    } while (len < 8 - over);
  
  	    // Address Type
  	    for (j = 0; addr_type_complete[j].expand != -1; ++j)
  		if (addr_type_complete[j].expand != ADDR_LINES
  			&& addr_type_complete[j].expand == cmd->uc_addr_type)
  		{
! 		    STRCPY(IObuff + len, addr_type_complete[j].shortname);
  		    len += (int)STRLEN(IObuff + len);
  		    break;
  		}
***************
*** 6128,6140 ****
  
  	    do {
  		IObuff[len++] = ' ';
! 	    } while (len < 24 - over);
  
  	    IObuff[len] = '\0';
  	    msg_outtrans(IObuff);
  
  	    msg_outtrans_special(cmd->uc_rep, FALSE,
! 					     name_len == 0 ? Columns - 46 : 0);
  #ifdef FEAT_EVAL
  	    if (p_verbose > 0)
  		last_set_msg(cmd->uc_script_ctx);
--- 6129,6141 ----
  
  	    do {
  		IObuff[len++] = ' ';
! 	    } while (len < 25 - over);
  
  	    IObuff[len] = '\0';
  	    msg_outtrans(IObuff);
  
  	    msg_outtrans_special(cmd->uc_rep, FALSE,
! 					     name_len == 0 ? Columns - 47 : 0);
  #ifdef FEAT_EVAL
  	    if (p_verbose > 0)
  		last_set_msg(cmd->uc_script_ctx);
*** ../vim-8.1.1203/runtime/doc/map.txt	2018-12-08 16:03:18.656085902 +0100
--- runtime/doc/map.txt	2019-04-25 21:24:01.951735065 +0200
***************
*** 371,378 ****
  
  							*omap-info*
  Operator-pending mappings can be used to define a movement command that can be
! used with any operator.  Simple example: ":omap { w" makes "y{" work like "yw"
! and "d{" like "dw".
  
  To ignore the starting cursor position and select different text, you can have
  the omap start Visual mode to select the text to be operated upon.  Example
--- 371,379 ----
  
  							*omap-info*
  Operator-pending mappings can be used to define a movement command that can be
! used with any operator.  Simple example: >
! 	:omap { w
! makes "y{" work like "yw" and "d{" like "dw".
  
  To ignore the starting cursor position and select different text, you can have
  the omap start Visual mode to select the text to be operated upon.  Example
***************
*** 383,391 ****
  before it.  That usually is the function name.
  
  To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
! first define it for all three modes, then unmap it for Operator-pending mode:
  	:map    xx something-difficult
  	:ounmap xx
  Likewise for a mapping for Visual and Operator-pending mode or Normal and
  Operator-pending mode.
  
--- 384,394 ----
  before it.  That usually is the function name.
  
  To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
! first define it for all three modes, then unmap it for
! Operator-pending mode: >
  	:map    xx something-difficult
  	:ounmap xx
+ 
  Likewise for a mapping for Visual and Operator-pending mode or Normal and
  Operator-pending mode.
  
***************
*** 1190,1198 ****
  
  :com[mand]						*:com* *:command*
  			List all user-defined commands.  When listing commands,
! 			the characters in the first two columns are
  			    !	Command has the -bang attribute
  			    "	Command has the -register attribute
  			    b	Command is local to current buffer
  			(see below for details on attributes)
  			The list can be filtered on command name with
--- 1193,1202 ----
  
  :com[mand]						*:com* *:command*
  			List all user-defined commands.  When listing commands,
! 			the characters in the first columns are:
  			    !	Command has the -bang attribute
  			    "	Command has the -register attribute
+ 			    |   Command has the -bar attribute
  			    b	Command is local to current buffer
  			(see below for details on attributes)
  			The list can be filtered on command name with
***************
*** 1251,1257 ****
  command can take arguments, using the -nargs attribute.  Valid cases are:
  
  	-nargs=0    No arguments are allowed (the default)
! 	-nargs=1    Exactly one argument is required, it includes spaces 
  	-nargs=*    Any number of arguments are allowed (0, 1, or many),
  		    separated by white space
  	-nargs=?    0 or 1 arguments are allowed
--- 1255,1261 ----
  command can take arguments, using the -nargs attribute.  Valid cases are:
  
  	-nargs=0    No arguments are allowed (the default)
! 	-nargs=1    Exactly one argument is required, it includes spaces
  	-nargs=*    Any number of arguments are allowed (0, 1, or many),
  		    separated by white space
  	-nargs=?    0 or 1 arguments are allowed
***************
*** 1276,1282 ****
  
  
  Completion behavior ~
! 				*:command-completion* *E179* *E180* *E181* 
  				*:command-complete*
  By default, the arguments of user defined commands do not undergo completion.
  However, by specifying one or the other of the following attributes, argument
--- 1280,1286 ----
  
  
  Completion behavior ~
! 				*:command-completion* *E179* *E180* *E181*
  				*:command-complete*
  By default, the arguments of user defined commands do not undergo completion.
  However, by specifying one or the other of the following attributes, argument
***************
*** 1397,1410 ****
  by default correspond to the current line, last line and the whole buffer,
  relate to arguments, (loaded) buffers, windows or tab pages.
  
! Possible values are:
! 	-addr=lines		Range of lines (this is the default)
! 	-addr=arguments		Range for arguments
! 	-addr=buffers		Range for buffers (also not loaded buffers)
! 	-addr=loaded_buffers	Range for loaded buffers
! 	-addr=windows		Range for windows
! 	-addr=tabs		Range for tab pages
! 	-addr=other		other kind of range 
  
  
  Special cases ~
--- 1401,1415 ----
  by default correspond to the current line, last line and the whole buffer,
  relate to arguments, (loaded) buffers, windows or tab pages.
  
! Possible values are (second column is the short name used in listing):
!     -addr=lines		  	Range of lines (this is the default)
!     -addr=arguments	  arg	Range for arguments
!     -addr=buffers	  buf	Range for buffers (also not loaded buffers)
!     -addr=loaded_buffers  load	Range for loaded buffers
!     -addr=windows	  win	Range for windows
!     -addr=tabs		  tab	Range for tab pages
!     -addr=quickfix	  qf	Range for quickfix entries
!     -addr=other		  ?	other kind of range
  
  
  Special cases ~
*** ../vim-8.1.1203/src/version.c	2019-04-25 20:28:53.327979592 +0200
--- src/version.c	2019-04-25 21:11:47.901549268 +0200
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1204,
  /**/

-- 
GUARD #1:  Where'd you get the coconut?
ARTHUR:    We found them.
GUARD #1:  Found them?  In Mercea?  The coconut's tropical!
ARTHUR:    What do you mean?
GUARD #1:  Well, this is a temperate zone.
                                  The Quest for the Holy Grail (Monty Python)

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