Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation backwards through opened buffers proceeds in order in which buffers were opened #1

Closed
jakewvincent opened this issue Sep 2, 2021 · 1 comment

Comments

@jakewvincent
Copy link
Owner

jakewvincent commented Sep 2, 2021

When navigating through files in nested directories, navigate backwards, and then navigate through nested directories along a different path, doesn't take you to last-opened, but to a file on the first path.

@jakewvincent jakewvincent changed the title Navigation backwards through opened buffers proceeds out of order Navigation backwards through opened buffers proceeds in order in which buffers were opened Sep 20, 2021
@jakewvincent
Copy link
Owner Author

Should be fixed with commit #d98c5fc. I implemented a pushdown stack in lua/mkdnflow/files.lua to help handle navigation in the expected way. The stack is a local variable defined in lua/mkdnflow/files.lua. Navigating from the current buffer using followPath() (mapped to by default) pushes the number of the buffer we just left onto the top of the buffer stack. Going back using goBack() (mapped to by default) takes us to the bufnr at the top of the stack, which is then immediately popped off the main stack and pushed onto a history stack. The history stack is currently not used for anything but I hope to eventually add a goForward() function that will be mapped to to bring back a buffer you just left via goBack().

jakewvincent added a commit that referenced this issue Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant