void
term_push_title(int which)
{
- if ((which & SAVE_RESTORE_TITLE) && *T_CST != NUL)
+ if ((which & SAVE_RESTORE_TITLE) && T_CST != NULL && *T_CST != NUL)
{
OUT_STR(T_CST);
out_flush();
}
- if ((which & SAVE_RESTORE_ICON) && *T_SSI != NUL)
+ if ((which & SAVE_RESTORE_ICON) && T_SSI != NULL && *T_SSI != NUL)
{
OUT_STR(T_SSI);
out_flush();
void
term_pop_title(int which)
{
- if ((which & SAVE_RESTORE_TITLE) && *T_CRT != NUL)
+ if ((which & SAVE_RESTORE_TITLE) && T_CRT != NULL && *T_CRT != NUL)
{
OUT_STR(T_CRT);
out_flush();
}
- if ((which & SAVE_RESTORE_ICON) && *T_SRI != NUL)
+ if ((which & SAVE_RESTORE_ICON) && T_SRI != NULL && *T_SRI != NUL)
{
OUT_STR(T_SRI);
out_flush();
endfor
if has('clientserver')
- " FIXME: need to add --servername to this list
- " but it causes vim-8.1.1282 to crash!
for opt in ['--remote', '--remote-send', '--remote-silent', '--remote-expr',
\ '--remote-tab', '--remote-tab-wait',
\ '--remote-tab-wait-silent', '--remote-tab-silent',
\ '--remote-wait', '--remote-wait-silent',
+ \ '--servername',
\ ]
let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
call assert_equal(1, v:shell_error)
endfor
endif
- " FIXME: commented out as this causes vim-8.1.1282 to crash!
- "if has('clipboard')
- " let out = split(system(GetVimCommand() .. ' --display'), "\n")
- " call assert_equal(1, v:shell_error)
- " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
- " call assert_equal('Argument missing after: "--display"', out[1])
- " call assert_equal('More info with: "vim -h"', out[2])
- "endif
+ if has('clipboard')
+ let out = split(system(GetVimCommand() .. ' --display'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+ call assert_equal('Argument missing after: "--display"', out[1])
+ call assert_equal('More info with: "vim -h"', out[2])
+ endif
let out = split(system(GetVimCommand() .. ' -ix'), "\n")
call assert_equal(1, v:shell_error)
call assert_equal('More info with: "vim -h"', out[2])
endfor
- " FIXME: commented out as this causes vim-8.1.1282 to crash!
- "if has('gui_gtk')
- " for opt in ['--socketid x', '--socketid 0xg']
- " let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
- " call assert_equal(1, v:shell_error)
- " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
- " call assert_equal('Invalid argument for: "--socketid"', out[1])
- " call assert_equal('More info with: "vim -h"', out[2])
- " endfor
- "endif
+ if has('gui_gtk')
+ for opt in ['--socketid x', '--socketid 0xg']
+ let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+ call assert_equal('Invalid argument for: "--socketid"', out[1])
+ call assert_equal('More info with: "vim -h"', out[2])
+ endfor
+ endif
endfunc
func Test_file_args()