Incorrect cursor placement after placing/unplacing a sign

12 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 16, 2019, 2:10:39 AM6/16/19
to vim_dev
Hi,

When placing a sign, if enabling the sign column wraps a previous
line, then the cursor is placed incorrectly. The following series of
commands reproduces the problem:

vim --noplugin -N -u NONE
:new
:call append(0, repeat('x', 80))
:call append(1, ["mmmm", "yyyy"])
:call cursor(2,1)
:sign define s1 texthl=Search text==>
:sign place 10 line=2 name=s1

The cursor will be positioned visually at screen line 2 instead of
screen line 3. Now if the sign is unplaced using:

:sign unplace 10

The cursor will be positioned visually at screen line 3 instead of
screen line 2.

- Yegappan

Bram Moolenaar

unread,
Jun 16, 2019, 7:56:02 AM6/16/19
to vim...@googlegroups.com, Yegappan Lakshmanan
I see. It's caused by the cursor position not being invalidated
properly. I'll make a fix.

--
Some of the well known MS-Windows errors:
ETIME Wrong time, wait a little while
ECRASH Try again...
EDETECT Unable to detect errors
EOVER You lost! Play another game?
ENOCLUE Eh, what did you want?

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages