diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-14 19:11:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-14 19:11:45 +0200 |
commit | efd5d8a967ba80f9e2826c35be98344d8f00af77 (patch) | |
tree | 131d5feb37fc8521b821f3cbe1ad47ff53b53ca0 /src/findfile.c | |
parent | 2b22b113c6aedf2a1295cf7e6f2f2a5d463b3868 (diff) | |
download | vim-git-efd5d8a967ba80f9e2826c35be98344d8f00af77.tar.gz |
patch 8.2.1684: "gF" does not use line number after file in Visual modev8.2.1684
Problem: "gF" does not use line number after file in Visual mode.
Solution: Look for ":123" after the Visual area. (closes #6952)
Diffstat (limited to 'src/findfile.c')
-rw-r--r-- | src/findfile.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/findfile.c b/src/findfile.c index 190fc69dc..4f69c47ca 100644 --- a/src/findfile.c +++ b/src/findfile.c @@ -1934,6 +1934,13 @@ grab_file_name(long count, linenr_T *file_lnum) if (get_visual_text(NULL, &ptr, &len) == FAIL) return NULL; + // Only recognize ":123" here + if (file_lnum != NULL && ptr[len] == ':' && isdigit(ptr[len + 1])) + { + char_u *p = ptr + len + 1; + + *file_lnum = getdigits(&p); + } return find_file_name_in_path(ptr, len, options, count, curbuf->b_ffname); } |