mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
lint
This commit is contained in:
@@ -2151,7 +2151,7 @@ static void u_undoredo(int undo, bool do_buf_event)
|
||||
int new_flags;
|
||||
fmark_T namedm[NMARKS];
|
||||
visualinfo_T visualinfo;
|
||||
int empty_buffer; /* buffer became empty */
|
||||
bool empty_buffer; // buffer became empty
|
||||
u_header_T *curhead = curbuf->b_u_curhead;
|
||||
|
||||
/* Don't want autocommands using the undo structures here, they are
|
||||
@@ -2218,7 +2218,7 @@ static void u_undoredo(int undo, bool do_buf_event)
|
||||
}
|
||||
}
|
||||
|
||||
empty_buffer = FALSE;
|
||||
empty_buffer = false;
|
||||
|
||||
/* delete the lines between top and bot and save them in newarray */
|
||||
if (oldsize > 0) {
|
||||
@@ -2229,9 +2229,10 @@ static void u_undoredo(int undo, bool do_buf_event)
|
||||
newarray[i] = u_save_line(lnum);
|
||||
/* remember we deleted the last line in the buffer, and a
|
||||
* dummy empty line will be inserted */
|
||||
if (curbuf->b_ml.ml_line_count == 1)
|
||||
empty_buffer = TRUE;
|
||||
ml_delete(lnum, FALSE);
|
||||
if (curbuf->b_ml.ml_line_count == 1) {
|
||||
empty_buffer = true;
|
||||
}
|
||||
ml_delete(lnum, false);
|
||||
}
|
||||
} else
|
||||
newarray = NULL;
|
||||
@@ -2246,7 +2247,7 @@ static void u_undoredo(int undo, bool do_buf_event)
|
||||
if (empty_buffer && lnum == 0) {
|
||||
ml_replace((linenr_T)1, uep->ue_array[i], true);
|
||||
} else {
|
||||
ml_append(lnum, uep->ue_array[i], (colnr_T)0, FALSE);
|
||||
ml_append(lnum, uep->ue_array[i], (colnr_T)0, false);
|
||||
}
|
||||
xfree(uep->ue_array[i]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user