mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
Merge pull request #28434 from glepnir/23120
fix(float): wrong position when bufpos is out of range
This commit is contained in:
@ -827,7 +827,8 @@ void ui_ext_win_position(win_T *wp, bool validate)
|
||||
row += row_off;
|
||||
col += col_off;
|
||||
if (c.bufpos.lnum >= 0) {
|
||||
pos_T pos = { c.bufpos.lnum + 1, c.bufpos.col, 0 };
|
||||
int lnum = MIN(c.bufpos.lnum + 1, win->w_buffer->b_ml.ml_line_count);
|
||||
pos_T pos = { lnum, c.bufpos.col, 0 };
|
||||
int trow, tcol, tcolc, tcole;
|
||||
textpos2screenpos(win, &pos, &trow, &tcol, &tcolc, &tcole, true);
|
||||
row += trow - 1;
|
||||
|
Reference in New Issue
Block a user