mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
fix(jumplist): Ctrl+o, Ctrl+i weird behavior when deleting buffers #25461
Problem: - Navigation is not always symmetric: pressing Ctrl+o n times followed by Ctrl+i n times does not always gets me back to where I started. - Invalid buffers are not skipped by Ctrl+i/o, I have to press Ctrl+i/o multiple times to get to the next/previous buffer. Solution: - Remove all entries of a buffer from the jump list when deleting it. - Don't add a new entry to the jump list if the next buffer to be displayed is already in the jump list. Closes #25365
This commit is contained in:
@@ -405,7 +405,7 @@ buf_found:
|
||||
|
||||
// Open the changed buffer in the current window.
|
||||
if (buf != curbuf) {
|
||||
set_curbuf(buf, unload ? DOBUF_UNLOAD : DOBUF_GOTO);
|
||||
set_curbuf(buf, unload ? DOBUF_UNLOAD : DOBUF_GOTO, true);
|
||||
}
|
||||
|
||||
theend:
|
||||
|
Reference in New Issue
Block a user