mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
fix(inccommand): don't set an invalid 'undolevels' value (#24575)
Problem: Cannot break undo by setting 'undolevels' to itself in 'inccommand' preview callback. Solution: Don't set an invalid 'undolevels' value. Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
This commit is contained in:
@@ -2357,7 +2357,7 @@ static void cmdpreview_prepare(CpInfo *cpinfo)
|
||||
set_put(ptr_t, &saved_bufs, buf);
|
||||
|
||||
u_clearall(buf);
|
||||
buf->b_p_ul = LONG_MAX; // Make sure we can undo all changes
|
||||
buf->b_p_ul = INT_MAX; // Make sure we can undo all changes
|
||||
}
|
||||
|
||||
CpWinInfo cp_wininfo;
|
||||
|
Reference in New Issue
Block a user