summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/undo.c b/src/undo.c
index f9e735aaa..fd1bcc79c 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1405,10 +1405,15 @@ u_add_time(buf, buflen, tt)
ex_undojoin(eap)
exarg_T *eap;
{
- if (!curbuf->b_u_synced)
- return; /* already unsynced */
if (curbuf->b_u_newhead == NULL)
return; /* nothing changed before */
+ if (curbuf->b_u_curhead != NULL)
+ {
+ EMSG(_("E790: undojoin is not allowed after undo"));
+ return;
+ }
+ if (!curbuf->b_u_synced)
+ return; /* already unsynced */
if (p_ul < 0)
return; /* no entries, nothing to do */
else