Commit Graph

6 Commits

Author SHA1 Message Date
zeertzjq
421713523e
vim-patch:9.0.1745: Missing test coverage for blockwise Visual highlight (#24790)
Problem:  Missing test coverage for blockwise Visual highlight with
          virtual that starts with a double-width char.
Solution: Add a new virtual text to the test. Some other small fixes.

closes: vim/vim#12835

fc3058495d
2023-08-19 20:34:58 +08:00
zeertzjq
551998b7ee vim-patch:9.0.1725: cursor pos wrong after concealed text with 'virtualedit'
Problem:    Wrong cursor position when clicking after concealed text
            with 'virtualedit'.
Solution:   Store virtual columns in ScreenCols[] instead of text
            columns, and always use coladvance() when clicking.

This also fixes incorrect curswant when clicking on a TAB, so now
Test_normal_click_on_ctrl_char() asserts the same results as the ones
before patch 9.0.0048.

closes: vim/vim#12808

e500ae8e29

Remove the mouse_adjust_click() function.

There is a difference in behavior with the old mouse_adjust_click()
approach: when clicking on the character immediately after concealed
text that is completely hidden, cursor is put on the clicked character
rather than at the start of the concealed text. The new behavior is
better, but it causes unnecessary scrolling in a functional test (which
is an existing issue unrelated to these patches), so adjust the test.

Now fully merged:
vim-patch:9.0.0177: cursor position wrong with 'virtualedit' and mouse click
2023-08-18 19:34:16 +08:00
zeertzjq
5ff725fa94 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>
2023-08-18 19:34:07 +08:00
zeertzjq
1975062d3c
vim-patch:9.0.0662: concealed characters do not work correctly (#23454)
Problem:    Concealed characters do not work correctly.
Solution:   Subtract boguscols instead of adding them. (closes vim/vim#11273)

7500866182

Code change is N/A as Nvim has a draw_col variable instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-03 07:54:17 +08:00
zeertzjq
8bed07357d vim-patch:9.0.1141: 'cursorcolumn' and 'colorcolumn' wrong after concealing
Problem:    'cursorcolumn' and 'colorcolumn' wrong after concealing and
            wrapping line.
Solution:   Reset "wlv.vcol_off" after each screen line. (Alexey Radkov,
            closes vim/vim#11777)

aaa16b0918

Cherry-pick test_conceal.vim changes from patches 8.2.4339, 9.0.0418.

Co-authored-by: Alexey Radkov <alexey.radkov@gmail.com>
2023-04-19 16:23:08 +08:00
dundargoc
af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00