diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-02-12 14:29:27 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-02-12 14:29:27 +0000 |
commit | 4399ef4764584a24080670b4869cb8b5d31a4f78 (patch) | |
tree | c47e4671d16eeeadc9aa0b9a9cb19576e7c653b9 /src/main.c | |
parent | b11bd7e43f6cdca944dceebaa3c8012d6bf1a74e (diff) | |
download | vim-4399ef4764584a24080670b4869cb8b5d31a4f78.zip |
updated for version 7.0050
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c index 3b888f278..351225c2e 100644 --- a/src/main.c +++ b/src/main.c @@ -826,8 +826,9 @@ main /* "-w {scriptout}" write to script */ if (vim_isdigit(((char_u *)argv[0])[argv_idx])) { - argv_idx = -1; - break; /* not implemented, ignored */ + i = get_number_arg((char_u *)argv[0], &argv_idx, 10); + set_option_value((char_u *)"window", (long)i, NULL, 0); + break; } want_argument = TRUE; break; @@ -848,7 +849,17 @@ main restricted = TRUE; break; - case 'c': /* "-c {command}" execute command */ + case 'c': /* "-c{command}" or "-c {command}" execute + command */ + if (argv[0][argv_idx] != NUL) + { + if (n_commands >= MAX_ARG_CMDS) + mainerr(ME_EXTRA_CMD, NULL); + commands[n_commands++] = (char_u *)argv[0] + argv_idx; + argv_idx = -1; + break; + } + /*FALLTRHOUGH*/ case 'S': /* "-S {file}" execute Vim script */ case 'i': /* "-i {viminfo}" use for viminfo */ #ifndef FEAT_DIFF @@ -990,7 +1001,17 @@ scripterror: #endif break; - case 'w': /* "-w {scriptout}" append to script file */ + case 'w': /* "-w {nr}" 'window' value */ + /* "-w {scriptout}" append to script file */ + if (vim_isdigit(*((char_u *)argv[0]))) + { + argv_idx = 0; + i = get_number_arg((char_u *)argv[0], &argv_idx, 10); + set_option_value((char_u *)"window", (long)i, NULL, 0); + argv_idx = -1; + break; + } + /*FALLTRHOUGH*/ case 'W': /* "-W {scriptout}" overwrite script file */ if (scriptout != NULL) goto scripterror; |