[vim/vim] popup: keep wincol stable when textprop scrolls above host top (PR #20187)

1 view
Skip to first unread message

mattn

unread,
May 10, 2026, 9:18:56 PM (15 hours ago) May 10
to vim/vim, Subscribed

Follow-up to v9.2.0469 (clipwindow). popup_screenpos_above_top() probed textpos2screenpos() at prop_win->w_topline using the prop's own tp_col, so the returned screen_scol picked up topline's tab stops and multi-byte widths instead of the prop's actual line. Once the textprop scrolled above the host's top, the popup's wincol jittered left/right every time a wider or narrower line rotated into the topmost slot.

Compute the virtual column from the prop's actual line via getvcol() and translate it through prop_win's win_col_off / leftcol / wincol; row extrapolation from topline is unchanged.

Repro: drop a textprop in a buffer whose nearby lines mix tabs / multi-byte characters / plain ASCII, attach a clipwindow popup, :sp :sp, then scroll past the prop. Without the fix, popup_getpos().col oscillates between several values matching the topline content cycle; with the fix it stays put.


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

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

Commit Summary

  • 6022440 keep popup wincol stable when textprop scrolls above host top

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20187@github.com>

Reply all
Reply to author
Forward
0 new messages