mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
undo: fix possibility of aborting
This commit is contained in:
parent
620c8fdfe9
commit
b2f9c2b6c1
@ -3029,8 +3029,6 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
|
|||||||
curbuf = buf;
|
curbuf = buf;
|
||||||
// Args are tricky: this means replace empty range by empty range..
|
// Args are tricky: this means replace empty range by empty range..
|
||||||
u_savecommon(0, 1, 1, true);
|
u_savecommon(0, 1, 1, true);
|
||||||
curbuf = save_curbuf;
|
|
||||||
|
|
||||||
uhp = buf->b_u_curhead;
|
uhp = buf->b_u_curhead;
|
||||||
if (!uhp) {
|
if (!uhp) {
|
||||||
uhp = buf->b_u_newhead;
|
uhp = buf->b_u_newhead;
|
||||||
@ -3038,6 +3036,7 @@ u_header_T *u_force_get_undo_header(buf_T *buf)
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
curbuf = save_curbuf;
|
||||||
}
|
}
|
||||||
return uhp;
|
return uhp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user