comparison src/testdir/test_textprop.vim @ 29451:057c26b5c33a v9.0.0067

patch 9.0.0067: cannot show virtual text Commit: https://github.com/vim/vim/commit/7f9969c559b51446632ac7e8f76cde07e7d0078d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 25 18:13:54 2022 +0100 patch 9.0.0067: cannot show virtual text Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
author Bram Moolenaar <Bram@vim.org>
date Mon, 25 Jul 2022 19:15:06 +0200
parents b3828315a0d9
children ec5f48ab361b
comparison
equal deleted inserted replaced
29450:67f31c24291b 29451:057c26b5c33a
2185 2185
2186 call prop_type_delete('one') 2186 call prop_type_delete('one')
2187 bwipe! 2187 bwipe!
2188 endfunc 2188 endfunc
2189 2189
2190 func Test_prop_inserts_text()
2191 CheckRunVimInTerminal
2192
2193 " Just a basic check for now
2194 let lines =<< trim END
2195 call setline(1, 'insert some text here and other text there and some more text after wrapping')
2196 call prop_type_add('someprop', #{highlight: 'ErrorMsg'})
2197 call prop_type_add('otherprop', #{highlight: 'Search'})
2198 call prop_type_add('moreprop', #{highlight: 'DiffAdd'})
2199 call prop_add(1, 18, #{type: 'someprop', text: 'SOME '})
2200 call prop_add(1, 38, #{type: 'otherprop', text: 'OTHER '})
2201 call prop_add(1, 69, #{type: 'moreprop', text: 'MORE '})
2202 redraw
2203 normal $
2204 END
2205 call writefile(lines, 'XscriptPropsWithText')
2206 let buf = RunVimInTerminal('-S XscriptPropsWithText', #{rows: 6, cols: 60})
2207 call VerifyScreenDump(buf, 'Test_prop_inserts_text', {})
2208
2209 call StopVimInTerminal(buf)
2210 call delete('XscriptPropsWithText')
2211 endfunc
2212
2190 " vim: shiftwidth=2 sts=2 expandtab 2213 " vim: shiftwidth=2 sts=2 expandtab