summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-11-27 16:22:48 +0100
committerBram Moolenaar <Bram@vim.org>2014-11-27 16:22:48 +0100
commitb96a7f325c9047d6a65424d40e493d3e0eff26b5 (patch)
treee1ede3b804b7e235b967d5a607eaa2d4a916fc63 /src/window.c
parentbaf0344ed7031369a0f355beb062eb4c34e35261 (diff)
downloadvim-b96a7f325c9047d6a65424d40e493d3e0eff26b5.zip
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)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index 6490fd386..92fcbbe71 100644
--- a/src/window.c
+++ b/src/window.c
@@ -199,14 +199,22 @@ newwindow:
case Ctrl_Q:
case 'q':
reset_VIsual_and_resel(); /* stop Visual mode */
- do_cmdline_cmd((char_u *)"quit");
+ STRCPY(cbuf, "quit");
+ if (Prenum)
+ vim_snprintf((char *)cbuf + 4, sizeof(cbuf) - 5,
+ "%ld", Prenum);
+ do_cmdline_cmd(cbuf);
break;
/* close current window */
case Ctrl_C:
case 'c':
reset_VIsual_and_resel(); /* stop Visual mode */
- do_cmdline_cmd((char_u *)"close");
+ STRCPY(cbuf, "close");
+ if (Prenum)
+ vim_snprintf((char *)cbuf + 5, sizeof(cbuf) - 5,
+ "%ld", Prenum);
+ do_cmdline_cmd(cbuf);
break;
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
@@ -235,7 +243,11 @@ newwindow:
case 'o':
CHECK_CMDWIN
reset_VIsual_and_resel(); /* stop Visual mode */
- do_cmdline_cmd((char_u *)"only");
+ STRCPY(cbuf, "only");
+ if (Prenum > 0)
+ vim_snprintf((char *)cbuf + 4, sizeof(cbuf) - 4,
+ "%ld", Prenum);
+ do_cmdline_cmd(cbuf);
break;
/* cursor to next window with wrap around */