diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-06 16:24:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-06 16:24:01 +0100 |
commit | b328cca2548936c5f68fff683049a929882f5011 (patch) | |
tree | 8237567d6c94872a3bf97768e70bf8cc327e4533 /src/sign.c | |
parent | 8ad16da7290190f55f88073d5586dfe133fddf45 (diff) | |
download | vim-git-8.1.0697.tar.gz |
patch 8.1.0697: ":sign place" requires the buffer argumentv8.1.0697
Problem: ":sign place" requires the buffer argument.
Solution: Make the argument optional. Also update the help and clean up the
sign test. (Yegappan Lakshmanan, closes #3767)
Diffstat (limited to 'src/sign.c')
-rw-r--r-- | src/sign.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sign.c b/src/sign.c index e600bfc99..fd5528c18 100644 --- a/src/sign.c +++ b/src/sign.c @@ -1168,7 +1168,7 @@ sign_jump_cmd( int id, char_u *group) { - if (buf == NULL && sign_name == NULL && group == NULL && id == -1) + if (sign_name == NULL && group == NULL && id == -1) { EMSG(_(e_argreq)); return; @@ -1325,6 +1325,11 @@ parse_sign_cmd_args( return FAIL; } + // If the filename is not supplied for the sign place or the sign jump + // command, then use the current buffer. + if (filename == NULL && (cmd == SIGNCMD_PLACE || cmd == SIGNCMD_JUMP)) + *buf = curwin->w_buffer; + return OK; } |