mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
feat(decorations): support virtual lines (for now: only one block at a time)
This commit is contained in:
@@ -241,7 +241,7 @@ retnomove:
|
||||
if (row < 0) {
|
||||
count = 0;
|
||||
for (first = true; curwin->w_topline > 1; ) {
|
||||
if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) {
|
||||
if (curwin->w_topfill < win_get_fill(curwin, curwin->w_topline)) {
|
||||
count++;
|
||||
} else {
|
||||
count += plines_win(curwin, curwin->w_topline - 1, true);
|
||||
@@ -251,8 +251,8 @@ retnomove:
|
||||
}
|
||||
first = false;
|
||||
(void)hasFolding(curwin->w_topline, &curwin->w_topline, NULL);
|
||||
if (curwin->w_topfill < diff_check(curwin, curwin->w_topline)) {
|
||||
++curwin->w_topfill;
|
||||
if (curwin->w_topfill < win_get_fill(curwin, curwin->w_topline)) {
|
||||
curwin->w_topfill++;
|
||||
} else {
|
||||
--curwin->w_topline;
|
||||
curwin->w_topfill = 0;
|
||||
@@ -283,11 +283,10 @@ retnomove:
|
||||
}
|
||||
|
||||
if (curwin->w_topfill > 0) {
|
||||
--curwin->w_topfill;
|
||||
curwin->w_topfill--;
|
||||
} else {
|
||||
++curwin->w_topline;
|
||||
curwin->w_topfill =
|
||||
diff_check_fill(curwin, curwin->w_topline);
|
||||
curwin->w_topline++;
|
||||
curwin->w_topfill = win_get_fill(curwin, curwin->w_topline);
|
||||
}
|
||||
}
|
||||
check_topfill(curwin, false);
|
||||
@@ -373,12 +372,12 @@ bool mouse_comp_pos(win_T *win, int *rowp, int *colp, linenr_T *lnump)
|
||||
|
||||
while (row > 0) {
|
||||
// Don't include filler lines in "count"
|
||||
if (win->w_p_diff
|
||||
if (win_may_fill(win)
|
||||
&& !hasFoldingWin(win, lnum, NULL, NULL, true, NULL)) {
|
||||
if (lnum == win->w_topline) {
|
||||
row -= win->w_topfill;
|
||||
} else {
|
||||
row -= diff_check_fill(win, lnum);
|
||||
row -= win_get_fill(win, lnum);
|
||||
}
|
||||
count = plines_win_nofill(win, lnum, true);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user