summaryrefslogtreecommitdiff
path: root/src/sign.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-07 22:10:00 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-07 22:10:00 +0100
commitb589f95b38ddd779d7e696abb0ea011dc92ea903 (patch)
tree24f42685d980df4cba0808b723a60a638d2d57bc /src/sign.c
parentd730c8e2974609034016ca66db09d2ef78784343 (diff)
downloadvim-git-b589f95b38ddd779d7e696abb0ea011dc92ea903.tar.gz
patch 8.1.0702: ":sign place" only uses the current bufferv8.1.0702
Problem: ":sign place" only uses the current buffer. Solution: List signs for all buffers when there is no buffer argument. Fix error message for invalid buffer name in sign_place(). (Yegappan Lakshmanan, closes #3774)
Diffstat (limited to 'src/sign.c')
-rw-r--r--src/sign.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sign.c b/src/sign.c
index 0dfc5525d..686a94374 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -1237,6 +1237,7 @@ parse_sign_cmd_args(
char_u *arg1;
char_u *name;
char_u *filename = NULL;
+ int lnum_arg = FALSE;
// first arg could be placed sign id
arg1 = arg;
@@ -1259,6 +1260,7 @@ parse_sign_cmd_args(
arg += 5;
*lnum = atoi((char *)arg);
arg = skiptowhite(arg);
+ lnum_arg = TRUE;
}
else if (STRNCMP(arg, "*", 1) == 0 && cmd == SIGNCMD_UNPLACE)
{
@@ -1327,7 +1329,8 @@ parse_sign_cmd_args(
// 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))
+ if (filename == NULL && ((cmd == SIGNCMD_PLACE && lnum_arg)
+ || cmd == SIGNCMD_JUMP))
*buf = curwin->w_buffer;
return OK;