aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/undo.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /src/nvim/undo.c
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-rahm.tar.gz
rneovim-rahm.tar.bz2
rneovim-rahm.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r--src/nvim/undo.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 0f8857a6bd..8d791a4c38 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -89,7 +89,6 @@
#include "nvim/buffer_updates.h"
#include "nvim/change.h"
#include "nvim/cursor.h"
-#include "nvim/decoration.h"
#include "nvim/drawscreen.h"
#include "nvim/edit.h"
#include "nvim/errors.h"
@@ -107,12 +106,10 @@
#include "nvim/getchar.h"
#include "nvim/gettext_defs.h"
#include "nvim/globals.h"
-#include "nvim/highlight.h"
#include "nvim/highlight_defs.h"
#include "nvim/macros_defs.h"
#include "nvim/mark.h"
#include "nvim/mark_defs.h"
-#include "nvim/marktree_defs.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memline_defs.h"
@@ -1862,6 +1859,7 @@ static void u_doit(int startcount, bool quiet, bool do_buf_event)
u_oldcount = -1;
}
+ msg_ext_set_kind("undo");
int count = startcount;
while (count--) {
// Do the change warning now, so that it triggers FileChangedRO when
@@ -2528,7 +2526,7 @@ static void u_undoredo(bool undo, bool do_buf_event)
/// @param absolute used ":undo N"
static void u_undo_end(bool did_undo, bool absolute, bool quiet)
{
- if ((fdo_flags & FDO_UNDO) && KeyTyped) {
+ if ((fdo_flags & kOptFdoFlagUndo) && KeyTyped) {
foldOpenCursor();
}
@@ -2595,12 +2593,12 @@ static void u_undo_end(bool did_undo, bool absolute, bool quiet)
check_pos(curbuf, &VIsual);
}
- smsg_hl_keep(0, _("%" PRId64 " %s; %s #%" PRId64 " %s"),
- u_oldcount < 0 ? (int64_t)-u_oldcount : (int64_t)u_oldcount,
- _(msgstr),
- did_undo ? _("before") : _("after"),
- uhp == NULL ? 0 : (int64_t)uhp->uh_seq,
- msgbuf);
+ smsg_keep(0, _("%" PRId64 " %s; %s #%" PRId64 " %s"),
+ u_oldcount < 0 ? (int64_t)-u_oldcount : (int64_t)u_oldcount,
+ _(msgstr),
+ did_undo ? _("before") : _("after"),
+ uhp == NULL ? 0 : (int64_t)uhp->uh_seq,
+ msgbuf);
}
/// Put the timestamp of an undo header in "buf[buflen]" in a nice format.