mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fold: lineFolded() is bool
This commit is contained in:
parent
6dfaf8e914
commit
971e9370ad
@ -274,14 +274,11 @@ int foldLevel(linenr_T lnum)
|
|||||||
return foldLevelWin(curwin, lnum);
|
return foldLevelWin(curwin, lnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* lineFolded() {{{2 */
|
// lineFolded() {{{2
|
||||||
/*
|
// Low level function to check if a line is folded. Doesn't use any caching.
|
||||||
* Low level function to check if a line is folded. Doesn't use any caching.
|
// Return true if line is folded.
|
||||||
* Return TRUE if line is folded.
|
// Return false if line is not folded.
|
||||||
* Return FALSE if line is not folded.
|
bool lineFolded(win_T *const win, const linenr_T lnum)
|
||||||
* Return MAYBE if the line is folded when next to a folded line.
|
|
||||||
*/
|
|
||||||
int lineFolded(win_T *win, linenr_T lnum)
|
|
||||||
{
|
{
|
||||||
return foldedCount(win, lnum, NULL) != 0;
|
return foldedCount(win, lnum, NULL) != 0;
|
||||||
}
|
}
|
||||||
|
@ -1240,10 +1240,10 @@ plines_win_nofill (
|
|||||||
if (wp->w_width == 0)
|
if (wp->w_width == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* A folded lines is handled just like an empty line. */
|
// A folded lines is handled just like an empty line.
|
||||||
/* NOTE: Caller must handle lines that are MAYBE folded. */
|
if (lineFolded(wp, lnum)) {
|
||||||
if (lineFolded(wp, lnum) == TRUE)
|
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
lines = plines_win_nofold(wp, lnum);
|
lines = plines_win_nofold(wp, lnum);
|
||||||
if (winheight > 0 && lines > wp->w_height)
|
if (winheight > 0 && lines > wp->w_height)
|
||||||
|
Loading…
Reference in New Issue
Block a user