diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-09-16 08:51:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 08:51:28 -0400 |
commit | cf522488cca72b0dd6f19f0c0c3c007b8d118c3f (patch) | |
tree | 1d340fa93157488daad04192c33d5a43c0c3b217 /src/nvim/window.c | |
parent | c3f4610922b3f26c952281481f65d255ad352ac5 (diff) | |
parent | 2ed48e71d3a55ee95579df80e46f3fa40639d84a (diff) | |
download | rneovim-cf522488cca72b0dd6f19f0c0c3c007b8d118c3f.tar.gz rneovim-cf522488cca72b0dd6f19f0c0c3c007b8d118c3f.tar.bz2 rneovim-cf522488cca72b0dd6f19f0c0c3c007b8d118c3f.zip |
Merge pull request #12914 from janlazo/vim-8.2.1675
vim-patch:8.1.{2108,2222,2338},8.2.{637,1526,1675,1684}
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index cec0dfd67f..6608deb231 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -6019,6 +6019,12 @@ char_u *grab_file_name(long count, linenr_T *file_lnum) char_u *ptr; 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_long(&p, false, 0); + } return find_file_name_in_path(ptr, len, options, count, curbuf->b_ffname); } return file_name_at_cursor(options | FNAME_HYP, count, file_lnum); |