Mercurial > vim
view src/testdir/test_feedkeys.vim @ 29413:34e93e046526 v9.0.0048
patch 9.0.0048: cursor in wrong column with mouse click after concealed text
Commit: https://github.com/vim/vim/commit/b90818867c089d4987f1a48ee3666674826d6f4b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 9 04:56:24 2022 +0100
patch 9.0.0048: cursor in wrong column with mouse click after concealed text
Problem: Cursor in wrong column with mouse click after concealed text.
Solution: Store the text column when drawing text.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 09 Jul 2022 06:00:06 +0200 |
parents | 53c608c7ea9e |
children |
line wrap: on
line source
" Test feedkeys() function. func Test_feedkeys_x_with_empty_string() new call feedkeys("ifoo\<Esc>") call assert_equal('', getline('.')) call feedkeys('', 'x') call assert_equal('foo', getline('.')) " check it goes back to normal mode immediately. call feedkeys('i', 'x') call assert_equal('foo', getline('.')) quit! endfunc func Test_feedkeys_with_abbreviation() new inoreabbrev trigger value call feedkeys("atrigger ", 'x') call feedkeys("atrigger ", 'x') call assert_equal('value value ', getline(1)) bwipe! iunabbrev trigger endfunc func Test_feedkeys_escape_special() nnoremap … <Cmd>let g:got_ellipsis += 1<CR> call feedkeys('…', 't') call assert_equal('…', getcharstr()) let g:got_ellipsis = 0 call feedkeys('…', 'xt') call assert_equal(1, g:got_ellipsis) unlet g:got_ellipsis nunmap … endfunc " vim: shiftwidth=2 sts=2 expandtab