aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorFelipe Morales <hel.sheep@gmail.com>2015-01-10 20:27:17 -0300
committerFelipe Morales <hel.sheep@gmail.com>2015-04-28 23:08:30 -0300
commit86330fdd3f39a8975b25b7050a3d02b77a442057 (patch)
tree51f60759b67fec7740cc7a6adbb9c2bac4395b73 /src/nvim/window.c
parent6a8862ded4d6f1693ac591ac8e47d1acbd044c49 (diff)
downloadrneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.tar.gz
rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.tar.bz2
rneovim-86330fdd3f39a8975b25b7050a3d02b77a442057.zip
vim-patch:7.4.530-531
Specify different kinds of counts for commands. Updated ex commands generator scripts. Includes fixes to comments from patch 7.4.531 Original message: 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) https://code.google.com/p/vim/source/detail?r=v7-4-530 https://code.google.com/p/vim/source/detail?r=v7-4-531 Add legacy tests for 7.4.530 https://code.google.com/p/vim/source/detail?r=1e6d87a36dcdca231721dde8cbbc26610fb3df27
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 4f31c09eeb..90f46c3410 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -151,14 +151,20 @@ 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 + 4, sizeof(cbuf) - 5, "%ld", Prenum);
+ do_cmdline_cmd(cbuf);
break;
/* close preview window */
@@ -183,7 +189,10 @@ newwindow:
case Ctrl_O:
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 */