mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
fix(plines): folded lines with virt_lines attached to line above
This commit is contained in:
@@ -38,8 +38,7 @@
|
||||
/// @param winheight when true limit to window height
|
||||
int plines_win(win_T *wp, linenr_T lnum, bool winheight)
|
||||
{
|
||||
// Check for filler lines above this buffer line. When folded the result
|
||||
// is one line anyway.
|
||||
// Check for filler lines above this buffer line.
|
||||
return plines_win_nofill(wp, lnum, winheight) + win_get_fill(wp, lnum);
|
||||
}
|
||||
|
||||
@@ -199,16 +198,12 @@ int plines_win_col(win_T *wp, linenr_T lnum, long column)
|
||||
int plines_win_full(win_T *wp, linenr_T lnum, linenr_T *const nextp, bool *const foldedp,
|
||||
const bool cache, const bool winheight)
|
||||
{
|
||||
bool folded = hasFoldingWin(wp, lnum, NULL, nextp, cache, NULL);
|
||||
if (foldedp) {
|
||||
bool folded = hasFoldingWin(wp, lnum, &lnum, nextp, cache, NULL);
|
||||
if (foldedp != NULL) {
|
||||
*foldedp = folded;
|
||||
}
|
||||
if (folded) {
|
||||
return 1;
|
||||
} else if (lnum == wp->w_topline) {
|
||||
return plines_win_nofill(wp, lnum, winheight) + wp->w_topfill;
|
||||
}
|
||||
return plines_win(wp, lnum, winheight);
|
||||
return ((folded ? 1 : plines_win_nofill(wp, lnum, winheight)) +
|
||||
(lnum == wp->w_topline ? wp->w_topfill : win_get_fill(wp, lnum)));
|
||||
}
|
||||
|
||||
int plines_m_win(win_T *wp, linenr_T first, linenr_T last)
|
||||
|
Reference in New Issue
Block a user