To: vim_dev@googlegroups.com Subject: Patch 8.0.1644 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1644 Problem: Terminal API tests still fail. Solution: Explicitly set 'title' in the terminal job. (Ozaki Kiichi, closes #2750) Files: src/testdir/test_terminal.vim, src/testdir/screendump.vim *** ../vim-8.0.1643/src/testdir/test_terminal.vim 2018-03-25 19:09:52.072089328 +0200 --- src/testdir/test_terminal.vim 2018-03-25 20:27:03.666201600 +0200 *************** *** 1029,1038 **** return endif call assert_equal(1, winnr('$')) - set title " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let &titlestring = ''["drop","Xtextfile"]''', \ 'redraw', --- 1029,1038 ---- return endif call assert_equal(1, winnr('$')) " Use the title termcap entries to output the escape sequence. call writefile([ + \ 'set title', \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let &titlestring = ''["drop","Xtextfile"]''', \ 'redraw', *************** *** 1046,1052 **** call StopVimInTerminal(buf) call delete('Xscript') bwipe Xtextfile - set title& endfunc func Test_terminal_api_drop_oldwin() --- 1046,1051 ---- *************** *** 1058,1067 **** let textfile_winid = win_getid() call assert_equal(2, winnr('$')) call win_gotoid(firstwinid) - set title " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let &titlestring = ''["drop","Xtextfile"]''', \ 'redraw', --- 1057,1066 ---- let textfile_winid = win_getid() call assert_equal(2, winnr('$')) call win_gotoid(firstwinid) " Use the title termcap entries to output the escape sequence. call writefile([ + \ 'set title', \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let &titlestring = ''["drop","Xtextfile"]''', \ 'redraw', *************** *** 1074,1080 **** call StopVimInTerminal(buf) call delete('Xscript') bwipe Xtextfile - set title& endfunc func TryThis(bufnum, arg) --- 1073,1078 ---- *************** *** 1086,1095 **** if !CanRunVimInTerminal() return endif - set title " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let &titlestring = ''["call","TryThis",["hello",123]]''', \ 'redraw', --- 1084,1093 ---- if !CanRunVimInTerminal() return endif " Use the title termcap entries to output the escape sequence. call writefile([ + \ 'set title', \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let &titlestring = ''["call","TryThis",["hello",123]]''', \ 'redraw', *************** *** 1104,1108 **** call delete('Xscript') unlet g:called_bufnum unlet g:called_arg - set title& endfunc --- 1102,1105 ---- *** ../vim-8.0.1643/src/testdir/screendump.vim 2018-03-25 18:56:20.236729661 +0200 --- src/testdir/screendump.vim 2018-03-25 20:28:06.569839236 +0200 *************** *** 24,30 **** " By default uses a size of 20 lines and 75 columns. " Returns the buffer number of the terminal. " ! " Options is a dictionary (not used yet). func RunVimInTerminal(arguments, options) " If Vim doesn't exit a swap file remains, causing other tests to fail. " Remove it here. --- 24,32 ---- " By default uses a size of 20 lines and 75 columns. " Returns the buffer number of the terminal. " ! " Options is a dictionary, these items are recognized: ! " "rows" - height of the terminal window (max. 20) ! " "cols" - width of the terminal window (max. 78) func RunVimInTerminal(arguments, options) " If Vim doesn't exit a swap file remains, causing other tests to fail. " Remove it here. *************** *** 47,63 **** set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE ! " Make the window 20 lines high, unless told otherwise. ! let rows = 20 ! if has_key(a:options, 'rows') ! let rows = a:options['rows'] ! endif let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments ! let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': 75}) ! call assert_equal([rows, 75], term_getsize(buf)) return buf endfunc --- 49,63 ---- set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE ! " Make the window 20 lines high and 75 columns, unless told otherwise. ! let rows = get(a:options, 'rows', 20) ! let cols = get(a:options, 'cols', 75) let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments ! let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols}) ! call assert_equal([rows, cols], term_getsize(buf)) return buf endfunc *** ../vim-8.0.1643/src/version.c 2018-03-25 19:09:52.072089328 +0200 --- src/version.c 2018-03-25 20:30:44.704884357 +0200 *************** *** 768,769 **** --- 768,771 ---- { /* Add new patch number below this line */ + /**/ + 1644, /**/ -- I'm trying to be an optimist, but I don't think it'll work. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///