mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0734: the hlsearch state is not stored in a session file (#13547)
Problem: The hlsearch state is not stored in a session file. Solution: Add "nohlsearch" if appropriate. (Jason Franklin)e3c74d249a
Vi default for 'sessionoptions' includes 'options'. Use 'set sessionoptions&vi' to use Vim's default 'sessionoptions'. If a test sets 'sessionoptions', reset 'sessionoptions' at the end of the test. N/A patches for version.c: vim-patch:8.2.0119: message test fails on some platforms Problem: Message test fails on some platforms. (Elimar Riesebieter) Solution: Add type cast to vim_snprintf() argument. (Dominique Pelle)1470dc35c4
vim-patch:8.2.0234: message test fails on SunOS Problem: Message test fails on SunOS. Solution: Adjust expectation for printf "%p". (Ozaki Kiichi, closes vim/vim#5595)d5b9914938
vim-patch:8.2.2149: popupwin test for latin1 sometimes fails Problem: Popupwin test for latin1 sometimes fails. Solution: Wait for the script to finish.4c5bdb99ad
vim-patch:8.2.2150: Github actions CI isn't used for all available platforms Problem: Github actions CI isn't used for all available platforms. Solution: Update the github workflows. (Ozaki Kiichi, closes vim/vim#7433)8ea05de6aa
vim-patch:8.2.2151: $dir not expanded when configure checks for moonjit Problem: $dir not expanded when configure checks for moonjit. Solution: Use double quotes instead of single quotes. (closes vim/vim#7478)a79a8944da
vim-patch:8.2.2153: popupwin test for latin1 still fails sometimes Problem: Popupwin test for latin1 still fails sometimes. Solution: Wait for the "cat" command to finish.b125b535bb
vim-patch:8.2.2154: popupwin test for terminal buffer fails sometimes Problem: Popupwin test for terminal buffer fails sometimes. Solution: Wait for the prompt to appear.0353f56ddb
This commit is contained in:
parent
f007a140ab
commit
5ce328df40
@ -893,6 +893,9 @@ void ex_mkrc(exarg_T *eap)
|
|||||||
&& (*flagp & SSOP_OPTIONS))) {
|
&& (*flagp & SSOP_OPTIONS))) {
|
||||||
failed |= (makemap(fd, NULL) == FAIL
|
failed |= (makemap(fd, NULL) == FAIL
|
||||||
|| makeset(fd, OPT_GLOBAL, false) == FAIL);
|
|| makeset(fd, OPT_GLOBAL, false) == FAIL);
|
||||||
|
if (p_hls && fprintf(fd, "%s", "set hlsearch\n") < 0) {
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!failed && view_session) {
|
if (!failed && view_session) {
|
||||||
@ -949,11 +952,16 @@ void ex_mkrc(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
if (fprintf(fd,
|
if (fprintf(fd,
|
||||||
"%s",
|
"%s",
|
||||||
"let &g:so = s:so_save | let &g:siso = s:siso_save\n"
|
"let &g:so = s:so_save | let &g:siso = s:siso_save\n")
|
||||||
"doautoall SessionLoadPost\n")
|
|
||||||
< 0) {
|
< 0) {
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
|
if (no_hlsearch && fprintf(fd, "%s", "nohlsearch\n") < 0) {
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
|
if (fprintf(fd, "%s", "doautoall SessionLoadPost\n") < 0) {
|
||||||
|
failed = true;
|
||||||
|
}
|
||||||
if (eap->cmdidx == CMD_mksession) {
|
if (eap->cmdidx == CMD_mksession) {
|
||||||
if (fprintf(fd, "unlet SessionLoad\n") < 0) {
|
if (fprintf(fd, "unlet SessionLoad\n") < 0) {
|
||||||
failed = true;
|
failed = true;
|
||||||
|
@ -20,6 +20,7 @@ set tags=./tags,tags
|
|||||||
set undodir^=.
|
set undodir^=.
|
||||||
set wildoptions=
|
set wildoptions=
|
||||||
set startofline
|
set startofline
|
||||||
|
set sessionoptions&vi
|
||||||
|
|
||||||
" Prevent Nvim log from writing to stderr.
|
" Prevent Nvim log from writing to stderr.
|
||||||
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log'
|
||||||
|
@ -128,6 +128,7 @@ func Test_mksession()
|
|||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
call delete(tmpfile)
|
call delete(tmpfile)
|
||||||
let &wrap = wrap_save
|
let &wrap = wrap_save
|
||||||
|
set sessionoptions&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_mksession_winheight()
|
func Test_mksession_winheight()
|
||||||
@ -154,7 +155,7 @@ func Test_mksession_rtp()
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
new
|
new
|
||||||
set sessionoptions+=options
|
set sessionoptions&vi
|
||||||
let _rtp=&rtp
|
let _rtp=&rtp
|
||||||
" Make a real long (invalid) runtimepath value,
|
" Make a real long (invalid) runtimepath value,
|
||||||
" that should exceed PATH_MAX (hopefully)
|
" that should exceed PATH_MAX (hopefully)
|
||||||
@ -174,6 +175,7 @@ func Test_mksession_rtp()
|
|||||||
call assert_equal(expected, li)
|
call assert_equal(expected, li)
|
||||||
|
|
||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
|
set sessionoptions&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Verify that arglist is stored correctly to the session file.
|
" Verify that arglist is stored correctly to the session file.
|
||||||
@ -218,6 +220,25 @@ func Test_mksession_one_buffer_two_windows()
|
|||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
if has('extra_search')
|
||||||
|
|
||||||
|
func Test_mksession_hlsearch()
|
||||||
|
set sessionoptions&vi
|
||||||
|
set hlsearch
|
||||||
|
mksession! Xtest_mks.out
|
||||||
|
nohlsearch
|
||||||
|
source Xtest_mks.out
|
||||||
|
call assert_equal(1, v:hlsearch, 'session should restore search highlighting state')
|
||||||
|
nohlsearch
|
||||||
|
mksession! Xtest_mks.out
|
||||||
|
source Xtest_mks.out
|
||||||
|
call assert_equal(0, v:hlsearch, 'session should restore search highlighting state')
|
||||||
|
set sessionoptions&
|
||||||
|
call delete('Xtest_mks.out')
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
" Test :mkview with a file argument.
|
" Test :mkview with a file argument.
|
||||||
func Test_mkview_file()
|
func Test_mkview_file()
|
||||||
" Create a view with line number and a fold.
|
" Create a view with line number and a fold.
|
||||||
|
Loading…
Reference in New Issue
Block a user