Sublime Forum

Sublime Text 4: Ctrl-PageUp/Ctrl-PageDown and the buffer stack

#1

Sublime Text 3 features the following behavior: when the user presses Ctrl-PageUp or Ctrl-PageDown, the editor switches to the buffer listed above or below in the buffer list (Open Files panel). This allows the user to switch to another buffer without using the mouse. The selected buffer is not moved to the top of the internal buffer stack until the user releases the Ctrl key. This way, when the user presses Ctrl-Tab, the editor will switch back to the buffer which was viewed when the user initiated Ctrl-PageUp/Ctrl-PageDown traversal.

Unfortunately, Sublime Text 4 seems to have broken this functionality, as buffers visited during the Ctrl-PageUp, Ctrl-PageDown traversal seem to be immediately added to the buffer stack. Pressing Ctrl-Tab afterwards revisits all these buffers in reverse order.

I am using default key bindings:
{ “keys”: [“ctrl+pagedown”], “command”: “next_view” },
{ “keys”: [“ctrl+shift+pagedown”], “command”: “next_view”, “args”: {“extend”: true} },
{ “keys”: [“ctrl+pageup”], “command”: “prev_view” },
{ “keys”: [“ctrl+shift+pageup”], “command”: “prev_view”, “args”: {“extend”: true} },

{ "keys": ["ctrl+tab"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view_in_stack" },

Is there an argument which could be added to next_view/prev_view to prevent the buffer from being moved to the top of the stack until the Ctrl key is released, the way it used to be handled in Sublime Text 3?

0 Likes

#2

This issue is fixed as of ST4114+

0 Likes

#3

Great, thank you! Updated to version 4116 and it’s all working as expected! :slight_smile:

0 Likes