mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
vim-patch:8.2.1684: "gF" does not use line number after file in Visual mode
Problem: "gF" does not use line number after file in Visual mode.
Solution: Look for ":123" after the Visual area. (closes vim/vim#6952)
efd5d8a967
Cherry-pick test_gf_visual changes from patch 8.2.1040.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user