mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
fix(inccommand): don't save information of a buffer twice (#24501)
Problem: 'inccommand' doesn't restore 'undolevels' properly for a buffer shown in multiple windows. Solution: Don't save information of a buffer twice.
This commit is contained in:
@@ -174,9 +174,12 @@ describe(":substitute, 'inccommand' preserves", function()
|
||||
it("'undolevels' (inccommand="..case..")", function()
|
||||
feed_command("set undolevels=139")
|
||||
feed_command("setlocal undolevels=34")
|
||||
feed_command("split") -- Show the buffer in multiple windows
|
||||
feed_command("set inccommand=" .. case)
|
||||
insert("as")
|
||||
feed(":%s/as/glork/<enter>")
|
||||
feed(":%s/as/glork/")
|
||||
poke_eventloop()
|
||||
feed("<enter>")
|
||||
eq(meths.get_option_value('undolevels', {scope='global'}), 139)
|
||||
eq(meths.get_option_value('undolevels', {buf=0}), 34)
|
||||
end)
|
||||
|
Reference in New Issue
Block a user