Mercurial > vim
diff src/sign.c @ 15378:0d76dd701e49 v8.1.0697
patch 8.1.0697: ":sign place" requires the buffer argument
commit https://github.com/vim/vim/commit/b328cca2548936c5f68fff683049a929882f5011
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 6 16:24:01 2019 +0100
patch 8.1.0697: ":sign place" requires the buffer argument
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 06 Jan 2019 16:30:05 +0100 |
parents | a6330a49e036 |
children | 317846db300a |
line wrap: on
line diff
--- 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; }