diff options
author | vE5li <ve5li@tuta.io> | 2024-01-29 04:08:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-28 19:08:51 -0800 |
commit | af6537bc66e2ea506b9640c34720ef85d4704be6 (patch) | |
tree | 4ffa528dff7c9aafeaa8157690a89e3bf1adc90a /src/nvim/ex_cmds2.c | |
parent | eee52d3427e2c97c0e9a9347bafdd55d49830ec7 (diff) | |
download | rneovim-af6537bc66e2ea506b9640c34720ef85d4704be6.tar.gz rneovim-af6537bc66e2ea506b9640c34720ef85d4704be6.tar.bz2 rneovim-af6537bc66e2ea506b9640c34720ef85d4704be6.zip |
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
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 842f8a4297..484b3572ab 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -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: |