call assert_equal(['{......}--one==two##$'], ScreenLines(1, virtcol('$')))
" Setting the global setting to the default value should not impact a window
- " using a local setting
+ " using a local setting.
split
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
setglobal listchars&vim
call assert_equal(['^I one two $'], ScreenLines(1, virtcol('$')))
" Setting the local setting to the default value should not impact a window
- " using a global setting
+ " using a global setting.
set listchars=tab:{.},lead:-,space:=,trail:#,eol:$
split
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
call assert_equal(['{......}--one==two##$'], ScreenLines(1, virtcol('$')))
" Using set in a window with a local setting should change it to use the
- " global setting and also impact other windows using the global setting
+ " global setting and also impact other windows using the global setting.
split
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
call assert_equal(['<------>__one..two@@#'], ScreenLines(1, virtcol('$')))
call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
" Setting invalid value for a local setting should not impact the local and
- " global settings
+ " global settings.
split
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
let cmd = 'setlocal listchars=tab:{.},lead:-,space:=,trail:#,eol:$,x'
call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
" Setting invalid value for a global setting should not impact the local and
- " global settings
+ " global settings.
split
setlocal listchars=tab:<->,lead:_,space:.,trail:@,eol:#
let cmd = 'setglobal listchars=tab:{.},lead:-,space:=,trail:#,eol:$,x'
close
call assert_equal(['+------+^^one>>two<<%'], ScreenLines(1, virtcol('$')))
+ " Closing window with local lcs-multispace should not cause a memory leak.
+ setlocal listchars=multispace:---+
+ split
+ call s:CheckListCharsValue('multispace:---+')
+ close
+
%bw!
set list& listchars&
endfunc