\ "normal 6G0i\<BS>\<Esc>",
\ "normal 3J",
\ "normal 3G",
- \], 'XtestProp')
+ \], 'XtestProp', 'D')
let buf = RunVimInTerminal('-S XtestProp', {'rows': 8})
call VerifyScreenDump(buf, 'Test_textprop_01', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestProp')
endfunc
func Test_textprop_hl_override()
set cursorline
2
END
- call writefile(lines, 'XtestOverProp')
+ call writefile(lines, 'XtestOverProp', 'D')
let buf = RunVimInTerminal('-S XtestOverProp', {'rows': 8})
call VerifyScreenDump(buf, 'Test_textprop_hl_override_1', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestOverProp')
endfunc
func RunTestVisualBlock(width, dump)
\ "call prop_add(9, 3, {'length': 3, 'type': 'search'})",
\ "call prop_add(10, 2, {'length': 3, 'type': 'search'})",
\ "normal 1G6|\<C-V>" .. repeat('l', a:width - 1) .. "10jx",
- \], 'XtestPropVis')
+ \], 'XtestPropVis', 'D')
let buf = RunVimInTerminal('-S XtestPropVis', {'rows': 12})
call VerifyScreenDump(buf, 'Test_textprop_vis_' .. a:dump, {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestPropVis')
endfunc
" screenshot test with Visual block mode operations
call prop_add(1, 2, {'length': 3, 'type': 'search'})
call prop_add(2, 3, {'length': 3, 'type': 'search'})
END
- call writefile(lines, 'XtestPropTab')
+ call writefile(lines, 'XtestPropTab', 'D')
let buf = RunVimInTerminal('-S XtestPropTab', {'rows': 6})
call VerifyScreenDump(buf, 'Test_textprop_tab', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestPropTab')
endfunc
func Test_textprop_nowrap_scrolled()
prop_add(1, 32, {'length': 4, 'type': 'number'})
feedkeys('gg20zl', 'nxt')
END
- call writefile(lines, 'XtestNowrap')
+ call writefile(lines, 'XtestNowrap', 'D')
let buf = RunVimInTerminal('-S XtestNowrap', {'rows': 6})
call VerifyScreenDump(buf, 'Test_textprop_nowrap_01', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestNowrap')
endfunc
func Test_textprop_text_priority()
call prop_add(1, 17, #{type: 'two', text: 'two: '})
call prop_add(1, 17, #{type: 'arg', length: len('argument')})
END
- call writefile(lines, 'XtestPropPrio')
+ call writefile(lines, 'XtestPropPrio', 'D')
let buf = RunVimInTerminal('-S XtestPropPrio', {'rows': 5})
call VerifyScreenDump(buf, 'Test_prop_at_same_pos', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestPropPrio')
endfunc
func Test_textprop_with_syntax()
call prop_type_add('TPTitle', #{ highlight: 'Title' })
call prop_add(1, 2, #{type: 'TPTitle', end_col: 5})
END
- call writefile(lines, 'XtestPropSyn')
+ call writefile(lines, 'XtestPropSyn', 'D')
let buf = RunVimInTerminal('-S XtestPropSyn', {'rows': 6})
call VerifyScreenDump(buf, 'Test_textprop_syn_1', {})
" clean up
call StopVimInTerminal(buf)
- call delete('XtestPropSyn')
endfunc
" Adding a text property to a new buffer should not fail
set signcolumn=yes
endfunc
END
- call writefile(lines, 'XscriptPropLinebreak')
+ call writefile(lines, 'XscriptPropLinebreak', 'D')
let buf = RunVimInTerminal('-S XscriptPropLinebreak', #{rows: 10})
call VerifyScreenDump(buf, 'Test_prop_linebreak_1', {})
call VerifyScreenDump(buf, 'Test_prop_linebreak_2', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropLinebreak')
endfunc
func Test_prop_with_linebreak()
prop_type_add('test', {highlight: 'Special'})
prop_add(1, 4, {text: ': virtual text', type: 'test', text_wrap: 'wrap'})
END
- call writefile(lines, 'XscriptPropWithLinebreak')
+ call writefile(lines, 'XscriptPropWithLinebreak', 'D')
let buf = RunVimInTerminal('-S XscriptPropWithLinebreak', #{rows: 6, cols: 50})
call VerifyScreenDump(buf, 'Test_prop_with_linebreak_1', {})
call term_sendkeys(buf, "iasdf asdf asdf asdf asdf as\<Esc>")
call VerifyScreenDump(buf, 'Test_prop_with_linebreak_2', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropWithLinebreak')
endfunc
func Test_prop_with_wrap()
prop_type_add('test', {highlight: 'Special'})
prop_add(1, 43, {text: 'some virtual text', type: 'test'})
END
- call writefile(lines, 'XscriptPropWithWrap')
+ call writefile(lines, 'XscriptPropWithWrap', 'D')
let buf = RunVimInTerminal('-S XscriptPropWithWrap', #{rows: 6, cols: 50})
call VerifyScreenDump(buf, 'Test_prop_with_wrap_1', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropWithWrap')
endfunc
func Test_prop_after_tab()
call prop_type_add('test', #{highlight: 'ErrorMsg'})
call prop_add(1, 2, #{length: 1, type: 'test'})
END
- call writefile(lines, 'XscriptPropAfterTab')
+ call writefile(lines, 'XscriptPropAfterTab', 'D')
let buf = RunVimInTerminal('-S XscriptPropAfterTab', #{rows: 10})
call VerifyScreenDump(buf, 'Test_prop_after_tab', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropAfterTab')
endfunc
func Test_prop_before_tab()
call prop_add(6, 3, #{type: 'test', text: 'ABC'})
normal gg0
END
- call writefile(lines, 'XscriptPropBeforeTab')
+ call writefile(lines, 'XscriptPropBeforeTab', 'D')
let buf = RunVimInTerminal('-S XscriptPropBeforeTab', #{rows: 8})
call VerifyScreenDump(buf, 'Test_prop_before_tab_01', {})
call term_sendkeys(buf, "$")
call VerifyScreenDump(buf, 'Test_prop_before_tab_10', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropBeforeTab')
endfunc
func Test_prop_after_linebreak()
call prop_type_add('test', #{highlight: 'ErrorMsg'})
call prop_add(1, (&columns / 2) + 2, #{length: 1, type: 'test'})
END
- call writefile(lines, 'XscriptPropAfterLinebreak')
+ call writefile(lines, 'XscriptPropAfterLinebreak', 'D')
let buf = RunVimInTerminal('-S XscriptPropAfterLinebreak', #{rows: 10})
call VerifyScreenDump(buf, 'Test_prop_after_linebreak', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropAfterLinebreak')
endfunc
" Buffer number of 0 should be ignored, as if the parameter wasn't passed.
call prop_type_add('nohi', #{})
call prop_add(5, 6, #{type: 'nohi', text: 'no '})
END
- call writefile(lines, 'XscriptPropsWithText')
+ call writefile(lines, 'XscriptPropsWithText', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_inserts_text_1', {})
call VerifyScreenDump(buf, 'Test_prop_inserts_text_6', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithText')
endfunc
func Test_prop_inserts_text_highlight()
let @/ = ''
endfunc
END
- call writefile(lines, 'XscriptPropsWithHighlight')
+ call writefile(lines, 'XscriptPropsWithHighlight', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithHighlight', #{rows: 6, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_inserts_text_hi_1', {})
call term_sendkeys(buf, "/text (he\<CR>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_hi_6', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithHighlight')
endfunc
func Test_prop_add_with_text_fails()
call prop_add(1, 0, #{type: 'MyErrorText', text: 'Another error', text_wrap: 'wrap', text_align: 'right'})
normal G$
END
- call writefile(lines, 'XscriptPropsRightAlign')
+ call writefile(lines, 'XscriptPropsRightAlign', 'D')
let buf = RunVimInTerminal('-S XscriptPropsRightAlign', #{rows: 8})
call VerifyScreenDump(buf, 'Test_prop_right_align_twice_1', {})
call VerifyScreenDump(buf, 'Test_prop_right_align_twice_3', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsRightAlign')
endfunc
func Test_props_with_text_after()
call setline(3, 'right here')
call prop_add(3, 0, #{type: 'rightprop', text: 'söme和平téxt', text_align: 'right'})
END
- call writefile(lines, 'XscriptPropsWithTextAfter')
+ call writefile(lines, 'XscriptPropsWithTextAfter', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_1', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithTextAfter')
call assert_fails('call prop_add(1, 2, #{text: "yes", text_align: "right", type: "some"})', 'E1294:')
endfunc
})
normal G$
END
- call writefile(lines, 'XscriptPropsAfterTrunc')
+ call writefile(lines, 'XscriptPropsAfterTrunc', 'D')
let buf = RunVimInTerminal('-S XscriptPropsAfterTrunc', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_below_trunc_1', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsAfterTrunc')
endfunc
func Test_props_with_text_after_joined()
call prop_add(8, 0, #{type: 'afterprop', text: ' FFF', text_align: 'after'})
normal 3G6J
END
- call writefile(lines, 'XscriptPropsWithTextAfterJoined')
+ call writefile(lines, 'XscriptPropsWithTextAfterJoined', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithTextAfterJoined', #{rows: 6, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_joined_1', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithTextAfterJoined')
endfunc
func Test_props_with_text_after_truncated()
call setline(4, ['cursor here'])
normal 4Gfh
END
- call writefile(lines, 'XscriptPropsWithTextAfterTrunc')
+ call writefile(lines, 'XscriptPropsWithTextAfterTrunc', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithTextAfterTrunc', #{rows: 9, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_trunc_1', {})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_trunc_5', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithTextAfterTrunc')
endfunc
func Test_props_with_text_empty_line()
call prop_add(3, 1, #{type: 'prop1', text_wrap: 'wrap', text: repeat('X', &columns + 1)})
normal gg0
END
- call writefile(lines, 'XscriptPropsWithTextEmptyLine')
+ call writefile(lines, 'XscriptPropsWithTextEmptyLine', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithTextEmptyLine', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_1', {})
call term_sendkeys(buf, "$")
call VerifyScreenDump(buf, 'Test_prop_with_text_empty_line_5', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithTextEmptyLine')
endfunc
func Test_props_with_text_after_wraps()
call setline(4, ['cursor here'])
normal 4Gfh
END
- call writefile(lines, 'XscriptPropsWithTextAfterWraps')
+ call writefile(lines, 'XscriptPropsWithTextAfterWraps', 'D')
let buf = RunVimInTerminal('-S XscriptPropsWithTextAfterWraps', #{rows: 9, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_wraps_1', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsWithTextAfterWraps')
endfunc
func Test_props_with_text_after_nowrap()
call prop_add(3, 0, #{type: 'anotherprop', text: 'also right aligned', text_align: 'right'})
hi CursorLine ctermbg=lightgrey
END
- call writefile(lines, 'XscriptPropsAfterNowrap')
+ call writefile(lines, 'XscriptPropsAfterNowrap', 'D')
let buf = RunVimInTerminal('-S XscriptPropsAfterNowrap', #{rows: 12, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_1', {})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_nowrap_3', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsAfterNowrap')
endfunc
func Test_props_with_text_below_nowrap()
})
normal G$
END
- call writefile(lines, 'XscriptPropsBelowNowrap')
+ call writefile(lines, 'XscriptPropsBelowNowrap', 'D')
let buf = RunVimInTerminal('-S XscriptPropsBelowNowrap', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_below_nowrap_1', {})
call VerifyScreenDump(buf, 'Test_prop_with_text_below_nowrap_2', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsBelowNowrap')
endfunc
func Test_props_with_text_above()
let lines =<< trim END
vim9script
setline(1, ['one one one', 'two two two', 'three three three'])
- prop_type_add('test', {highlight: 'ModeMsg'})
+ prop_type_add('test', {highlight: 'Search'})
prop_add(2, 0, {
text: '└─ Virtual text below the 2nd line',
type: 'test',
call term_sendkeys(buf, "2GA\<CR>xx")
call VerifyScreenDump(buf, 'Test_prop_below_split_line_1', {})
- call term_sendkeys(buf, "\<Esc>")
+ call term_sendkeys(buf, "\<Esc>:set number\<CR>")
+ call VerifyScreenDump(buf, 'Test_prop_below_split_line_2', {})
+
call StopVimInTerminal(buf)
endfunc
autocmd CursorMoved * call Update()
END
- call writefile(lines, 'XscriptPropsCursorMovec')
+ call writefile(lines, 'XscriptPropsCursorMovec', 'D')
let buf = RunVimInTerminal('-S XscriptPropsCursorMovec', #{rows: 8, cols: 60})
call term_sendkeys(buf, "gg0w")
call VerifyScreenDump(buf, 'Test_prop_with_text_cursormoved_1', {})
call VerifyScreenDump(buf, 'Test_prop_with_text_cursormoved_1', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsCursorMovec')
endfunc
func Test_props_with_text_after_split_join()
call prop_add(1, 0, #{type: 'another', text: ' right here', text_align: 'right'})
endfunc
END
- call writefile(lines, 'XscriptPropsAfterSplitJoin')
+ call writefile(lines, 'XscriptPropsAfterSplitJoin', 'D')
let buf = RunVimInTerminal('-S XscriptPropsAfterSplitJoin', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_join_split_1', {})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_join_split_5', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsAfterSplitJoin')
endfunc
func Test_removed_prop_with_text_cleans_up_array()
prop_type_add('argname', {highlight: 'DiffChange', start_incl: true})
prop_add(3, 10, {type: 'argname', text: 'arg: '})
END
- call writefile(lines, 'XscriptPropsStartIncl')
+ call writefile(lines, 'XscriptPropsStartIncl', 'D')
let buf = RunVimInTerminal('-S XscriptPropsStartIncl', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_1', {})
call VerifyScreenDump(buf, 'Test_prop_insert_start_incl_8', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsStartIncl')
endfunc
func Test_insert_text_list_mode()
text_align: 'right'
})
END
- call writefile(lines, 'XscriptPropsListMode')
+ call writefile(lines, 'XscriptPropsListMode', 'D')
let buf = RunVimInTerminal('-S XscriptPropsListMode', #{rows: 8, cols: 60})
call term_sendkeys(buf, "ggj")
call VerifyScreenDump(buf, 'Test_prop_insert_list_mode_1', {})
call VerifyScreenDump(buf, 'Test_prop_insert_list_mode_3', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsListMode')
endfunc
func Test_insert_text_with_padding()
text_wrap: 'wrap',
})
END
- call writefile(lines, 'XscriptPropsPadded')
+ call writefile(lines, 'XscriptPropsPadded', 'D')
let buf = RunVimInTerminal('-S XscriptPropsPadded', #{rows: 8, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_text_with_padding_1', {})
call VerifyScreenDump(buf, 'Test_prop_text_with_padding_4', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsPadded')
endfunc
func Test_insert_text_change_arg()
text: '-',
})
END
- call writefile(lines, 'XscriptPropsChange')
+ call writefile(lines, 'XscriptPropsChange', 'D')
let buf = RunVimInTerminal('-S XscriptPropsChange', #{rows: 5, cols: 60})
call VerifyScreenDump(buf, 'Test_prop_text_change_arg_1', {})
call VerifyScreenDump(buf, 'Test_prop_text_change_arg_2', {})
call StopVimInTerminal(buf)
- call delete('XscriptPropsChange')
endfunc
" vim: shiftwidth=2 sts=2 expandtab