From ef44e597294e4d0d9128ef69b6aa7481a54e17cb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 5 Aug 2023 22:42:34 +0800 Subject: 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 --- src/nvim/ex_getln.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index ece6257c4a..87e45cbb66 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -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; -- cgit