Lines Matching refs:top
248 u_save(linenr_T top, linenr_T bot) in u_save() argument
253 if (top >= bot || bot > curbuf->b_ml.ml_line_count + 1) in u_save()
256 if (top + 2 == bot) in u_save()
257 u_saveline((linenr_T)(top + 1)); in u_save()
259 return (u_savecommon(top, bot, (linenr_T)0, FALSE)); in u_save()
412 linenr_T top, in u_savecommon() argument
439 if (netbeans_is_guarded(top, bot)) in u_savecommon()
479 if (bot - top > 1) in u_savecommon()
481 if (top > 0 && has_prop_w_flags(top + 1, TP_FLAG_CONT_PREV)) in u_savecommon()
482 --top; in u_savecommon()
493 size = bot - top - 1; in u_savecommon()
643 && top >= uep->ue_top in u_savecommon()
644 && top + 2 <= uep->ue_top + uep->ue_size + 1)) in u_savecommon()
648 if (uep->ue_size == 1 && uep->ue_top == top) in u_savecommon()
711 uep->ue_top = top; in u_savecommon()
733 for (i = 0, lnum = top + 1; i < size; ++i) in u_savecommon()
2672 linenr_T top, bot; in u_undoredo() local
2710 top = uep->ue_top; in u_undoredo()
2714 if (top > curbuf->b_ml.ml_line_count || top >= bot in u_undoredo()
2723 oldsize = bot - top - 1; // number of lines before undo in u_undoredo()
2728 if (top < newlnum) in u_undoredo()
2734 if (lnum >= top && lnum <= top + newsize + 1) in u_undoredo()
2746 char_u *p = ml_get(top + 1 + i); in u_undoredo()
2755 newlnum = top; in u_undoredo()
2760 newlnum = top + i; in u_undoredo()
2811 for (lnum = top, i = 0; i < newsize; ++i, ++lnum) in u_undoredo()
2829 mark_adjust(top + 1, top + oldsize, (long)MAXLNUM, in u_undoredo()
2831 if (curbuf->b_op_start.lnum > top + oldsize) in u_undoredo()
2833 if (curbuf->b_op_end.lnum > top + oldsize) in u_undoredo()
2837 changed_lines(top + 1, 0, bot, newsize - oldsize); in u_undoredo()
2840 if (top + 1 < curbuf->b_op_start.lnum) in u_undoredo()
2841 curbuf->b_op_start.lnum = top + 1; in u_undoredo()
2842 if (newsize == 0 && top + 1 > curbuf->b_op_end.lnum) in u_undoredo()
2843 curbuf->b_op_end.lnum = top + 1; in u_undoredo()
2844 else if (top + newsize > curbuf->b_op_end.lnum) in u_undoredo()
2845 curbuf->b_op_end.lnum = top + newsize; in u_undoredo()
2851 uep->ue_bot = top + newsize + 1; in u_undoredo()