diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-16 11:14:05 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-01 15:28:49 -0400 |
commit | 971e9370adc1cc96412a61f22713549680918ca3 (patch) | |
tree | b343b81fd695a325d1dc58d3121459be640695e6 | |
parent | 6dfaf8e91405660cf0528b8a5769bcb05056b0a0 (diff) | |
download | rneovim-971e9370adc1cc96412a61f22713549680918ca3.tar.gz rneovim-971e9370adc1cc96412a61f22713549680918ca3.tar.bz2 rneovim-971e9370adc1cc96412a61f22713549680918ca3.zip |
fold: lineFolded() is bool
-rw-r--r-- | src/nvim/fold.c | 13 | ||||
-rw-r--r-- | src/nvim/misc1.c | 6 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index ca297a31ef..429349cc1d 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -274,14 +274,11 @@ int foldLevel(linenr_T lnum) return foldLevelWin(curwin, lnum); } -/* lineFolded() {{{2 */ -/* - * Low level function to check if a line is folded. Doesn't use any caching. - * Return TRUE if line is folded. - * Return FALSE if line is not folded. - * Return MAYBE if the line is folded when next to a folded line. - */ -int lineFolded(win_T *win, linenr_T lnum) +// lineFolded() {{{2 +// Low level function to check if a line is folded. Doesn't use any caching. +// Return true if line is folded. +// Return false if line is not folded. +bool lineFolded(win_T *const win, const linenr_T lnum) { return foldedCount(win, lnum, NULL) != 0; } diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index 684f486c04..e4137e1da3 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1240,10 +1240,10 @@ plines_win_nofill ( if (wp->w_width == 0) return 1; - /* A folded lines is handled just like an empty line. */ - /* NOTE: Caller must handle lines that are MAYBE folded. */ - if (lineFolded(wp, lnum) == TRUE) + // A folded lines is handled just like an empty line. + if (lineFolded(wp, lnum)) { return 1; + } lines = plines_win_nofold(wp, lnum); if (winheight > 0 && lines > wp->w_height) |