Lines Matching refs:bot

65 static void foldUpdateIEMS __ARGS((win_T *wp, linenr_T top, linenr_T bot));
841 * The changes in lines from top to bot (inclusive).
844 foldUpdate(wp, top, bot)
847 linenr_T bot;
851 /* Mark all folds from top to bot as maybe-small. */
854 && fp->fd_top < bot)
872 foldUpdateIEMS(wp, top, bot);
2119 static linenr_T foldUpdateIEMSRecurse __ARGS((garray_T *gap, int level, linenr_T startlnum, fline_T *flp, void (*getlevel)__ARGS((fline_T *)), linenr_T bot, int topflags));
2121 static void foldSplit __ARGS((garray_T *gap, int i, linenr_T top, linenr_T bot));
2122 static void foldRemove __ARGS((garray_T *gap, linenr_T top, linenr_T bot));
2134 * Update the folding for window "wp", at least from lines "top" to "bot".
2138 foldUpdateIEMS(wp, top, bot)
2141 linenr_T bot;
2158 bot = wp->w_buffer->b_ml.ml_line_count;
2173 bot += diff_context;
2192 invalid_bot = bot;
2262 * appear). To take that into account we should adjust the value of "bot"
2287 if (fold_end_lnum > bot)
2288 bot = fold_end_lnum;
2293 end = bot;
2355 /* If we updated folds past "bot", need to redraw more lines. Don't do
2358 if (end != bot)
2375 * "bot", it's "bot" plus one if the fold continues and it's bigger when using
2381 * Below line "bot" there are no changes in the text.
2382 * "flp->lnum", "flp->lnum_save" and "bot" are relative to the start of the
2390 * Returns bot, which may have been increased for lines that also need to be
2394 foldUpdateIEMSRecurse(gap, level, startlnum, flp, getlevel, bot, topflags)
2400 linenr_T bot;
2430 * Loop over all lines in this fold, or until "bot" is hit.
2457 if (flp->lnum > bot && !finish && fp != NULL)
2487 bot = fp2->fd_top + fp2->fd_len - 1 + fp->fd_top;
2500 || flp->lnum_save >= bot
2601 return bot;
2603 /* The new fold continues until bot, unless we find the
2606 fp->fd_len = bot - firstlnum + 1;
2655 if (bot < flp->lnum)
2656 bot = flp->lnum;
2663 bot = foldUpdateIEMSRecurse(&fp->fd_nested, level + 1,
2665 bot - fp->fd_top, fp->fd_flags);
2670 bot += fp->fd_top;
2710 return bot;
2715 * lvl >= level: fold continues below "bot"
2736 if (fp->fd_top + fp->fd_len > bot + 1)
2738 /* fold continued below bot */
2745 bot = fp->fd_top + fp->fd_len - 1;
2751 * below bot */
2753 foldSplit(gap, i, flp->lnum, bot);
2796 if (bot < flp->lnum - 1)
2797 bot = flp->lnum - 1;
2799 return bot;
2827 * "bot" in two pieces, one ending above "top" and the other starting below
2828 * "bot".
2830 * "bot"!
2833 foldSplit(gap, i, top, bot)
2837 linenr_T bot;
2846 /* The fold continues below bot, need to split it. */
2850 fp[1].fd_top = bot + 1;
2856 /* Move nested folds below bot to new fold. There can't be
2857 * any between top and bot, they have been removed by the caller. */
2860 (void)(foldFind(gap1, bot + 1 - fp->fd_top, &fp2));
2879 * Remove folds within the range "top" to and including "bot".
2885 * bot 2 3 4 5
2891 * 3: split in two parts, one stops above "top", other starts below "bot".
2893 * 5: made to start below "bot".
2897 foldRemove(gap, top, bot)
2900 linenr_T bot;
2904 if (bot < top)
2913 foldRemove(&fp->fd_nested, top - fp->fd_top, bot - fp->fd_top);
2914 if (fp->fd_top + fp->fd_len > bot + 1)
2917 foldSplit(gap, (int)(fp - (fold_T *)gap->ga_data), top, bot);
2928 || fp->fd_top > bot)
2930 /* 6: Found a fold below bot, can stop looking. */
2937 if (fp->fd_top + fp->fd_len - 1 > bot)
2939 /* 5: Make fold that includes bot start below bot. */
2941 (linenr_T)0, (long)(bot - fp->fd_top),
2942 (linenr_T)MAXLNUM, (long)(fp->fd_top - bot - 1));
2943 fp->fd_len -= bot - fp->fd_top + 1;
2944 fp->fd_top = bot + 1;