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

Issue returning to previous view after jumping to an item in Trouble list #385

Closed
sdbuch opened this issue Feb 27, 2024 · 2 comments
Closed
Labels

Comments

@sdbuch
Copy link

sdbuch commented Feb 27, 2024

Hi,

I'm seeing a problem where after jumping to an item in the Trouble list (e.g., pressing <cr> with default bindings), trying to return to my previous view in the file I'm editing (e.g., with CTRL+o) does not work. I.e., pressing CTRL+o does not return to the view immediately prior to jumping, but whatever was before it on the jump list.

I was able to fix this issue (at least superficially) by inspecting these lines of code:

https://github.com/folke/trouble.nvim/blob/main/lua/trouble/util.lua#L10-L13

and reversing the order of L11 and L13. That is, saving the current view with m' after switching to the desired window seems sensible here, and seems to fix my issue. I'm not sure if I'm overlooking other cases where the currently implemented behavior is to be desired.

I can provide much more detailed information about my setup (MWE etc.) if this cannot be reproduced. Thanks!

@folke folke added enhancement New feature or request and removed enhancement New feature or request labels Mar 28, 2024
@folke folke added the fixed v3 label Mar 29, 2024
@folke
Copy link
Owner

folke commented Mar 29, 2024

Development on the main branch is EOL.

Trouble has been rewritten and will be merged in main soon.

This issue/feature either no longer exists or has been implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev

@folke folke closed this as completed Mar 29, 2024
@sdbuch
Copy link
Author

sdbuch commented Mar 29, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants