comparison src/window.c @ 6398:5a76e36f07b1 v7.4.530

updated for version 7.4.530 Problem: Many commands take a count or range that is not using line numbers. Solution: For each command specify what kind of count it uses. For windows, buffers and arguments have "$" and "." have a relevant meaning. (Marcin Szamotulski)
author Bram Moolenaar <bram@vim.org>
date Thu, 27 Nov 2014 16:22:48 +0100
parents 383cb9ddb561
children 84190359b979
comparison
equal deleted inserted replaced
6397:7f8c4ace6f97 6398:5a76e36f07b1
197 197
198 /* quit current window */ 198 /* quit current window */
199 case Ctrl_Q: 199 case Ctrl_Q:
200 case 'q': 200 case 'q':
201 reset_VIsual_and_resel(); /* stop Visual mode */ 201 reset_VIsual_and_resel(); /* stop Visual mode */
202 do_cmdline_cmd((char_u *)"quit"); 202 STRCPY(cbuf, "quit");
203 if (Prenum)
204 vim_snprintf((char *)cbuf + 4, sizeof(cbuf) - 5,
205 "%ld", Prenum);
206 do_cmdline_cmd(cbuf);
203 break; 207 break;
204 208
205 /* close current window */ 209 /* close current window */
206 case Ctrl_C: 210 case Ctrl_C:
207 case 'c': 211 case 'c':
208 reset_VIsual_and_resel(); /* stop Visual mode */ 212 reset_VIsual_and_resel(); /* stop Visual mode */
209 do_cmdline_cmd((char_u *)"close"); 213 STRCPY(cbuf, "close");
214 if (Prenum)
215 vim_snprintf((char *)cbuf + 5, sizeof(cbuf) - 5,
216 "%ld", Prenum);
217 do_cmdline_cmd(cbuf);
210 break; 218 break;
211 219
212 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX) 220 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
213 /* close preview window */ 221 /* close preview window */
214 case Ctrl_Z: 222 case Ctrl_Z:
233 /* close all but current window */ 241 /* close all but current window */
234 case Ctrl_O: 242 case Ctrl_O:
235 case 'o': 243 case 'o':
236 CHECK_CMDWIN 244 CHECK_CMDWIN
237 reset_VIsual_and_resel(); /* stop Visual mode */ 245 reset_VIsual_and_resel(); /* stop Visual mode */
238 do_cmdline_cmd((char_u *)"only"); 246 STRCPY(cbuf, "only");
247 if (Prenum > 0)
248 vim_snprintf((char *)cbuf + 4, sizeof(cbuf) - 4,
249 "%ld", Prenum);
250 do_cmdline_cmd(cbuf);
239 break; 251 break;
240 252
241 /* cursor to next window with wrap around */ 253 /* cursor to next window with wrap around */
242 case Ctrl_W: 254 case Ctrl_W:
243 case 'w': 255 case 'w':