if (pos->lnum >= wp->w_topline && pos->lnum <= wp->w_botline)
{
- colnr_T off;
colnr_T col;
int width;
linenr_T lnum = pos->lnum;
row += diff_check_fill(wp, lnum);
#endif
+ colnr_T off = win_col_off(wp);
#ifdef FEAT_FOLDING
if (is_folded)
{
row += W_WINROW(wp);
- coloff = wp->w_wincol + 1;
+ coloff = wp->w_wincol + 1 + off;
}
else
#endif
// similar to what is done in validate_cursor_col()
col = scol;
- off = win_col_off(wp);
col += off;
width = wp->w_width - off + win_col_off2(wp);
redraw
call assert_equal(2, screenpos(1, 2, 1).row)
call assert_equal(#{col: 1, row: 3, endcol: 1, curscol: 1}, screenpos(1, 3, 1))
- call assert_equal(3, screenpos(1, 4, 1).row)
- call assert_equal(3, screenpos(1, 5, 1).row)
+ call assert_equal(#{col: 1, row: 3, endcol: 1, curscol: 1}, screenpos(1, 4, 1))
+ call assert_equal(#{col: 1, row: 3, endcol: 1, curscol: 1}, screenpos(1, 5, 1))
+ setlocal number
+ call assert_equal(#{col: 5, row: 3, endcol: 5, curscol: 5}, screenpos(1, 3, 1))
+ call assert_equal(#{col: 5, row: 3, endcol: 5, curscol: 5}, screenpos(1, 4, 1))
+ call assert_equal(#{col: 5, row: 3, endcol: 5, curscol: 5}, screenpos(1, 5, 1))
call assert_equal(4, screenpos(1, 6, 1).row)
bwipe!
endfunc