aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_functions.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-21 16:54:11 +0800
committerGitHub <noreply@github.com>2023-08-21 16:54:11 +0800
commit8cd0ca1ce742a09df0b1b8201aaa13655d922b6c (patch)
tree82b30d58e88eab5e9f41c106549621edd0cc1e27 /test/old/testdir/test_functions.vim
parentdc01d68f27a0d80da62bac690e9ca4647bc70dd9 (diff)
parent28c2e83fb424395dbbdeacfc98f07ad4fa6c74c2 (diff)
downloadrneovim-8cd0ca1ce742a09df0b1b8201aaa13655d922b6c.tar.gz
rneovim-8cd0ca1ce742a09df0b1b8201aaa13655d922b6c.tar.bz2
rneovim-8cd0ca1ce742a09df0b1b8201aaa13655d922b6c.zip
Merge pull request #24819 from zeertzjq/vim-8.2.4208
vim-patch:8.2.{4208,4210,4211,4212},9.0.{0077,0313}
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r--test/old/testdir/test_functions.vim27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index 1d713e91ce..2672e70dc5 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -2009,6 +2009,32 @@ func Test_setbufvar_options()
bwipe!
endfunc
+func Test_setbufvar_keep_window_title()
+ CheckRunVimInTerminal
+ if !has('title') || empty(&t_ts)
+ throw "Skipped: can't get/set title"
+ endif
+
+ let lines =<< trim END
+ set title
+ edit Xa.txt
+ let g:buf = bufadd('Xb.txt')
+ inoremap <F2> <C-R>=setbufvar(g:buf, '&autoindent', 1) ?? ''<CR>
+ END
+ call writefile(lines, 'Xsetbufvar')
+ let buf = RunVimInTerminal('-S Xsetbufvar', {})
+ call WaitForAssert({-> assert_match('Xa.txt', term_gettitle(buf))}, 1000)
+
+ call term_sendkeys(buf, "i\<F2>")
+ call TermWait(buf)
+ call term_sendkeys(buf, "\<Esc>")
+ call TermWait(buf)
+ call assert_match('Xa.txt', term_gettitle(buf))
+
+ call StopVimInTerminal(buf)
+ call delete('Xsetbufvar')
+endfunc
+
func Test_redo_in_nested_functions()
nnoremap g. :set opfunc=Operator<CR>g@
function Operator( type, ... )
@@ -2567,7 +2593,6 @@ endfunc
func Test_state()
CheckRunVimInTerminal
- let g:test_is_flaky = 1
let getstate = ":echo 'state: ' .. g:state .. '; mode: ' .. g:mode\<CR>"