mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-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.
b90818867c
Tests only. Code changes moved to the port of patch 9.0.1725.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -4,6 +4,7 @@ source check.vim
|
||||
CheckFeature conceal
|
||||
|
||||
source screendump.vim
|
||||
source view_util.vim
|
||||
|
||||
func Test_conceal_two_windows()
|
||||
CheckScreendump
|
||||
@@ -334,4 +335,23 @@ func Test_conceal_eol()
|
||||
set nolist
|
||||
endfunc
|
||||
|
||||
func Test_conceal_mouse_click()
|
||||
enew!
|
||||
set mouse=a
|
||||
setlocal conceallevel=2 concealcursor=nc
|
||||
syn match Concealed "this" conceal
|
||||
hi link Concealed Search
|
||||
call setline(1, 'conceal this click here')
|
||||
redraw
|
||||
call assert_equal(['conceal click here '], ScreenLines(1, 20))
|
||||
|
||||
" click on 'h' of "here" puts cursor there
|
||||
call Ntest_setmouse(1, 16)
|
||||
call feedkeys("\<LeftMouse>", "tx")
|
||||
call assert_equal([0, 1, 20, 0, 20], getcurpos())
|
||||
|
||||
bwipe!
|
||||
set mouse&
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user