aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 4b267a1627..c95a795587 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -305,16 +305,12 @@ bool undo_allowed(void)
return true;
}
-/*
- * Get the undolevle value for the current buffer.
- */
+/// Get the 'undolevels' value for the current buffer.
static long get_undolevel(void)
{
- if (curbuf->terminal) {
- return -1;
- }
- if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL)
+ if (curbuf->b_p_ul == NO_LOCAL_UNDOLEVEL) {
return p_ul;
+ }
return curbuf->b_p_ul;
}
@@ -2512,13 +2508,14 @@ void ex_undolist(exarg_T *eap)
sort_strings((char_u **)ga.ga_data, ga.ga_len);
msg_start();
- msg_puts_attr((char_u *)_("number changes when saved"),
- hl_attr(HLF_T));
- for (int i = 0; i < ga.ga_len && !got_int; ++i) {
+ msg_puts_attr(_("number changes when saved"),
+ hl_attr(HLF_T));
+ for (int i = 0; i < ga.ga_len && !got_int; i++) {
msg_putchar('\n');
- if (got_int)
+ if (got_int) {
break;
- msg_puts(((char_u **)ga.ga_data)[i]);
+ }
+ msg_puts(((const char **)ga.ga_data)[i]);
}
msg_end();