[vim/vim] completion: ruler not updated to the cursor column when the popup menu is visible (PR #20626)

4 views
Skip to first unread message

h_east

unread,
8:43 AM (5 hours ago) 8:43 AM
to vim/vim, Subscribed
Problem:
While the insert-mode completion popup menu is visible, the ruler - and the ruler shown in a status line when 'laststatus' is set - shows the column where the completion started instead of the real cursor column. With a status line the ruler can also stay at the column from before the completion until the next key is pressed.

Solution:
Position the popup menu at the completion start column without moving the cursor there, so the ruler keeps reflecting the real cursor column.  Also mark the status line for redraw before the menu is shown, so its ruler is updated for the real cursor column while the menu is visible.

Notes for reviewers:

  • This is a pre-existing bug, independent of the 'autocompletedelay' work in
    PR #20598. The pum_display() cursor-column change here is the same one that
    currently lives in #20598; once this lands, #20598 will be rebased on top and
    drop that part, keeping only the autocompletedelay feature.
  • Making the ruler deterministically follow the real cursor column also removes
    a long-standing local-vs-CI discrepancy in the completion screendump tests
    (locally the ruler was already drawn at the real cursor, while the committed
    dumps held the completion-start column that CI produced).

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20626

Commit Summary

  • d0d986c completion: ruler not updated to the cursor column when the popup menu is visible

File Changes

(24 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20626@github.com>

Christian Brabandt

unread,
1:15 PM (1 hour ago) 1:15 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20626)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20626/c4791845525@github.com>

Reply all
Reply to author
Forward
0 new messages