[vim/vim] Cursor positions and movement in conceal (Issue #11681)

72 views
Skip to first unread message

aloispichler

unread,
Dec 8, 2022, 3:43:16 PM12/8/22
to vim/vim, Subscribed

Hello,

I am using conceallevel=2 and concealcursor=n (that is, conceal in normal mode).

  1. Suppose, in the following example, that \alpha, \beta, are concealed to α, β, and we edit the line “1+α+β+1”.
    Moving right by pushing ‘cursor right’ gives
    |1+α+β+1
    1|+α+β+1
    1+|α+β+1
    1+α|+β+1 (push ‘cursor right’ 6 times)
    1+α+|β+1
    1+α+β|+1 (push ‘cursor right’ 5 times)
    1+α+β+|1, etc.
    To surpass one character (as α), one needs to push the cursor 6 (!) times, etc.
    Everyone would expect that pushing the cursor once moves over the displayed character α, that's the sense of concealing.

  2. The position of the block cursor is strange as well:
    1+\al|pha+2 is displayed as 1+α|+|2. Instead, the cursor should indicate the correct position 1+|α|+2.

It should be corrected.
Thank you!


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11681@github.com>

Christian Brabandt

unread,
Dec 8, 2022, 3:52:51 PM12/8/22
to vim/vim, Subscribed

This is a known limitation of concealing. Cursor movements work on the actual characters and not on the visualization on top of it.

Since this is a duplicate of very old issues like #206 and #260, I am closing this ticket.

These days, virtual text may work better (but I must say I do not know).


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11681/1343337788@github.com>

Christian Brabandt

unread,
Dec 8, 2022, 3:52:55 PM12/8/22
to vim/vim, Subscribed

Closed #11681 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11681/issue_event/7992888251@github.com>

Reply all
Reply to author
Forward
0 new messages