1
0
forked from aniani/vim

patch 8.1.0702: ":sign place" only uses the current buffer

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)
This commit is contained in:
Bram Moolenaar
2019-01-07 22:10:00 +01:00
parent d730c8e297
commit b589f95b38
5 changed files with 22 additions and 2 deletions

View File

@@ -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;