diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-05 22:42:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 22:42:34 +0800 |
commit | ef44e597294e4d0d9128ef69b6aa7481a54e17cb (patch) | |
tree | 5c3e7fd203cf36f768806ecb2aa31e6f5c2edd3c /src/nvim/ex_getln.c | |
parent | 42630923fc00633d806af97c1792b2ed4a71e1cc (diff) | |
download | rneovim-ef44e597294e4d0d9128ef69b6aa7481a54e17cb.tar.gz rneovim-ef44e597294e4d0d9128ef69b6aa7481a54e17cb.tar.bz2 rneovim-ef44e597294e4d0d9128ef69b6aa7481a54e17cb.zip |
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>
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |