aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 76fc36607c..af78c89618 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -6020,10 +6020,20 @@ file_name_in_line (
if (file_lnum != NULL) {
char_u *p;
+ const char *line_english = " line ";
+ const char *line_transl = _(line_msg);
// 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)) {
p++; // skip the separator