is_folded = hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
#endif
row = plines_m_win(wp, wp->w_topline, lnum - 1) + 1;
+
+#ifdef FEAT_DIFF
+ // Add filler lines above this buffer line.
+ row += diff_check_fill(wp, lnum);
+#endif
+
#ifdef FEAT_FOLDING
if (is_folded)
{
bwipe!
endfunc
+func Test_screenpos_diff()
+ CheckFeature diff
+
+ enew!
+ call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'])
+ vnew
+ call setline(1, ['a', 'b', 'c', 'g', 'h', 'i'])
+ windo diffthis
+ wincmd w
+ call assert_equal(#{col: 3, row: 7, endcol: 3, curscol: 3}, screenpos(0, 4, 1))
+
+ windo diffoff
+ bwipe!
+ bwipe!
+endfunc
+
func Test_screenpos_number()
rightbelow new
rightbelow 73vsplit