sublime_text
sublime_text copied to clipboard
"Next/Previous File" doesn't update the current tab with respect to `open_tabs_after_current`
Description of the bug
Using "Next/Previous File" (aka next_view
/prev_view
) doesn't update the current tab when it comes to the open_tabs_after_current
setting. If that setting is true
, switching to another file using "Next/Previous File" and then opening a new tab will actually create the new tab after the previously current tab and not the actual current one.
I tested a few of the other tab switching methods and they don't seem to have this issue:
- "Next/Previous File in Stack"
- ⌘+<number> (aka
select_by_index
)
Here's a video demo. The first half involves me using "Next/Previous File" to navigate, resulting in the new tabs being created in the wrong place. The second half involves me using ⌘+<number>, resulting in new tabs being created in the correct spot (after the current tab):
https://user-images.githubusercontent.com/34594853/189202403-cc339189-6f5c-4732-a5e3-35381db171cb.mov
Steps to reproduce
- Start ST in Safe Mode.
- Open three new tabs. The current tab should now be the third and rightmost tab.
- Use "Previous File" to navigate to the first or second tabs.
- Create a new tab. The new tab will appear after the third tab and not the first or second tabs.
Expected behavior
The tabs should be created after the current one (by default in Safe Mode).
Actual behavior
The tabs are created after the previously current tab.
Sublime Text build number
4134
Operating system & version
macOS 12.4
(Linux) Desktop environment and/or window manager
No response
Additional information
No response
OpenGL context information
No response
@jasonhan-vassar This is intended behaviour. The sheet stack is not updated while cycling through tabs using prev_view or next_view (super+pageup/down) until the primary modifier is released.
Pressing another shortcut like new file before releasing the modifier should probably commit the selected tab as if the modifier was released.
Pressing another shortcut like new file before releasing the modifier should probably commit the selected tab as if the modifier was released.
This behavior was added in build 4144.