diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-22 15:38:06 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-22 15:38:06 +0100 |
commit | 64e74c9cc7d5aab215cf72d9bdd3aac32e128191 (patch) | |
tree | f56e752def4d77a8c2411a447cc4f47c3fc2b08e /src/findfile.c | |
parent | a27655ef6d0001c7c2265ea682455ec82acee826 (diff) | |
download | vim-git-64e74c9cc7d5aab215cf72d9bdd3aac32e128191.tar.gz |
patch 8.2.0030: "gF" does not work on output of "verbose command"v8.2.0030
Problem: "gF" does not work on output of "verbose command".
Solution: Recognize " line " and translations. (closes #5391)
Diffstat (limited to 'src/findfile.c')
-rw-r--r-- | src/findfile.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/findfile.c b/src/findfile.c index dba547da1..ba996c454 100644 --- a/src/findfile.c +++ b/src/findfile.c @@ -2047,10 +2047,19 @@ file_name_in_line( if (file_lnum != NULL) { char_u *p; + char *line_english = " line "; + char *line_transl = _(line_msg); - // Get the number after the file name and a separator character + // Get the number after the file name and a separator character. + // Also accept " line 999" with and without the same translation as + // used in last_set_msg(). p = ptr + len; - p = skipwhite(p); + if (STRNCMP(p, line_english, STRLEN(line_english)) == 0) + p += STRLEN(line_english); + else if (STRNCMP(p, line_transl, STRLEN(line_transl)) == 0) + p += STRLEN(line_transl); + else + p = skipwhite(p); if (*p != NUL) { if (!isdigit(*p)) |