vim-patch:7.4.1900 (#5259)

Problem:    Using CTRL-] in the help on "{address}." doesn't work.
Solution:   Recognize an item in {}. (Hirohito Higashi, closes vim/vim#814)

28b942a064
This commit is contained in:
Jurica Bradarić 2016-09-04 03:30:36 +02:00 committed by Justin M. Keyes
parent a9c5423263
commit 5d8d24f0c2
3 changed files with 19 additions and 6 deletions

View File

@ -4563,13 +4563,16 @@ int find_help_tags(char_u *arg, int *num_matches, char_u ***matches, int keep_la
break;
}
/*
* If tag starts with ', toss everything after a second '. Fixes
* CTRL-] on 'option'. (would include the trailing '.').
*/
if (*s == '\'' && s > arg && *arg == '\'')
// If tag starts with ', toss everything after a second '. Fixes
// CTRL-] on 'option'. (would include the trailing '.').
if (*s == '\'' && s > arg && *arg == '\'') {
break;
}
// Also '{' and '}'. Fixes CTRL-] on '{address}'.
if (*s == '}' && s > arg && *arg == '{') {
break;
}
}
*d = NUL;
if (*IObuff == '`') {

View File

@ -37,4 +37,14 @@ func Test_help_tagjump()
call assert_equal("help", &filetype)
call assert_true(getline('.') =~ '\*arglistid()\*')
helpclose
exec "help! 'autoindent'."
call assert_equal("help", &filetype)
call assert_true(getline('.') =~ "\\*'autoindent'\\*")
helpclose
exec "help! {address}."
call assert_equal("help", &filetype)
call assert_true(getline('.') =~ '\*{address}\*')
helpclose
endfunc

View File

@ -376,7 +376,7 @@ static int included_patches[] = {
// 1903,
// 1902 NA
// 1901 NA
// 1900,
1900,
// 1899 NA
1898,
// 1897,