$COLUMNS in bash) is a multiple of 3, minus 1, e.g. in my case 64 × 3 - 1 = 191,vim -u NONE,let l = '[' . repeat('=', 100) . ']' let s = '[' . repeat('=', 10) . ']' echo popup_create(l, #{ line: 20, col: 1, moved: [0,0,0], maxwidth: 63 }) echo popup_create(l, #{ line: 30, col: 65, moved: [0,0,0], maxwidth: 63 }) echo popup_create(l, #{ line: 35, col: 129, moved: [0,0,0], maxwidth: 63 }) echo popup_create(s, #{ line: 40, col: 129, moved: [0,0,0], maxwidth: 63 })
let l = '[' . repeat('=', 100) . ']' | let s = '[' . repeat('=', 10) . ']' | echo popup_create(l, #{ line: 20, col: 1, moved: [0,0,0], maxwidth: 63 }) | echo popup_create(l, #{ line: 30, col: 65, moved: [0,0,0], maxwidth: 63 }) | echo popup_create(l, #{ line: 35, col: 129, moved: [0,0,0], maxwidth: 63 }) | echo popup_create(s, #{ line: 40, col: 129, moved: [0,0,0], maxwidth: 63 })
The first and second calls to popup_create result in a popup which is tightly contained in the first and second window from the left, as expected, thanks to wrap = 1 (which is default in the second argument to popup_create), which results in the two long strings to be wrapped.
The fourth call to popup_create, since its first argument is short string, poses no problem, but it at least proves that col: 129 points to the first column of the rightmost window.
Unfortunately, the third call to popup_create results in a popup that doesn't wrap text.
The third call to popup_create should also result in a popup which is tightly contained in the window (the rightmost window).
v9.1.0949
Operating system: up-to-date ArchLinux
Terminal: URxvt
Value of $TERM: rxvt-unicode-256color
Shell: bash
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@bstaletic, since you authored 13c1153, maybe you can give a look at it?
The commit message reads:
Problem: popups inconsistently shifted to the left
Solution: always shift non-fixed popups to the left when the
text would be truncated
(no matter whether 'wrap' is set or not)
(Boris Staletic)
maybe wrap does matter, after all?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()