Merge pull request #37884 from zeertzjq/vim-9.2.0007

vim-patch:9.2.{0007,0009}
This commit is contained in:
zeertzjq
2026-02-16 09:07:51 +08:00
committed by GitHub
4 changed files with 28 additions and 11 deletions

View File

@@ -370,6 +370,9 @@ static bool cin_islabel(void) // XXX
return false;
}
if (ind_find_start_CORS(NULL)) {
return false; // Don't accept a label in a comment or a raw string.
}
// Only accept a label if the previous line is terminated or is a case
// label.
pos_T cursor_save;

View File

@@ -336,13 +336,13 @@ let test_values = {
\ 'timeout:-1', 'file:/tmp/file', 'expr:Func()', 'double,33'],
\ ['xxx', '-1', 'timeout:', 'best,double', 'double,fast']],
\ 'splitkeep': [['cursor', 'screen', 'topline'], ['xxx']],
\ 'statusline': [['', 'xxx'], ['%{', '%{%', '%{%}', '%(', '%)']],
\ 'statusline': [['', 'xxx'], ['%^', '%{', '%{%', '%{%}', '%(', '%)']],
"\ 'swapsync': [['', 'sync', 'fsync'], ['xxx']],
\ 'switchbuf': [['', 'useopen', 'usetab', 'split', 'vsplit', 'newtab',
\ 'uselast', 'split,newtab'],
\ ['xxx']],
\ 'tabclose': [['', 'left', 'uselast', 'left,uselast'], ['xxx']],
\ 'tabline': [['', 'xxx'], ['%{', '%{%', '%{%}', '%(', '%)']],
\ 'tabline': [['', 'xxx'], ['%^', '%{', '%{%', '%{%}', '%(', '%)']],
\ 'tagcase': [['followic', 'followscs', 'ignore', 'match', 'smart'],
\ ['', 'xxx', 'smart,match']],
\ 'termencoding': [has('gui_gtk') ? [] : ['', 'utf-8'], ['xxx']],

View File

@@ -127,7 +127,7 @@ func Test_cindent_func()
bwipe!
endfunc
func Test_cindent_1()
func Test_cindent_01()
new
setl cindent ts=4 sw=4
setl cino& sts&
@@ -1127,6 +1127,12 @@ func Test_cindent_1()
a();
}
void func() {
/* aaaaaa
bbbbb:
ccccccc */
}
/* end of AUTO */
[CODE]
@@ -2130,6 +2136,12 @@ func Test_cindent_1()
a();
}
void func() {
/* aaaaaa
bbbbb:
ccccccc */
}
/* end of AUTO */
[CODE]
@@ -2138,7 +2150,7 @@ func Test_cindent_1()
enew! | close
endfunc
func Test_cindent_2()
func Test_cindent_02()
new
setl cindent ts=4 sw=4
setl tw=0 noai fo=croq
@@ -2180,7 +2192,7 @@ func Test_cindent_2()
enew! | close
endfunc
func Test_cindent_3()
func Test_cindent_03()
new
setl nocindent ts=4 sw=4
@@ -2240,7 +2252,7 @@ func Test_cindent_3()
enew! | close
endfunc
func Test_cindent_4()
func Test_cindent_04()
new
setl cindent ts=4 sw=4
@@ -2270,7 +2282,7 @@ func Test_cindent_4()
enew! | close
endfunc
func Test_cindent_5()
func Test_cindent_05()
new
setl cindent ts=4 sw=4
setl cino=}4
@@ -2320,7 +2332,7 @@ func Test_cindent_5()
enew! | close
endfunc
func Test_cindent_6()
func Test_cindent_06()
new
setl cindent ts=4 sw=4
setl cino=(0,)20
@@ -2383,7 +2395,7 @@ func Test_cindent_6()
enew! | close
endfunc
func Test_cindent_7()
func Test_cindent_07()
new
setl cindent ts=4 sw=4
setl cino=es,n0s
@@ -2424,7 +2436,7 @@ func Test_cindent_7()
enew! | close
endfunc
func Test_cindent_8()
func Test_cindent_08()
new
setl cindent ts=4 sw=4
setl cino=
@@ -2472,7 +2484,7 @@ func Test_cindent_8()
enew! | close
endfunc
func Test_cindent_9()
func Test_cindent_09()
new
setl cindent ts=4 sw=4

View File

@@ -866,6 +866,7 @@ func Test_set_option_errors()
call assert_fails('set rulerformat=%15(%%', 'E542:')
" Test for 'statusline' errors
call assert_fails('set statusline=%^', 'E539:') " Nvim: supports %$
call assert_fails('set statusline=%{', 'E540:')
call assert_fails('set statusline=%{%', 'E540:')
call assert_fails('set statusline=%{%}', 'E539:')
@@ -873,6 +874,7 @@ func Test_set_option_errors()
call assert_fails('set statusline=%)', 'E542:')
" Test for 'tabline' errors
call assert_fails('set tabline=%^', 'E539:') " Nvim: supports %$
call assert_fails('set tabline=%{', 'E540:')
call assert_fails('set tabline=%{%', 'E540:')
call assert_fails('set tabline=%{%}', 'E539:')