fix(file-manager): open the selection with Enter instead of changing directory

Enter quit the panel and cd'ed the shell, which silently did nothing when the
panel ran in a dock, where there is no shell to move. Enter now behaves like
the right arrow and descends into a directory in place, while Ctrl+Enter keeps
the shell directory change and no longer depends on the selection.
This commit is contained in:
BlackAngelTV committed 2026-11-09 12:24:06 +01:00
1 parent fab02aa915
commit de13151af1
4 files changed
+33 -30

No files matched your search

+8 -7
View File
@@ -90,14 +90,15 @@ map('Select first entry', 'home --allow-fallback=shifted,ascii g home')
map('Select last entry', 'end end end')
map('Select last entry', 'end shift+g end')
map(
'Change shell directory or open selection',
'Open the selection',
'activate enter activate',
long_text="""
When the selection is a directory it becomes the working directory of the shell
that launched the panel. When it is a file, the panel opens it in kitty's editor
(:opt:`editor`, :envvar:`VISUAL` or :envvar:`EDITOR`) in a new tab, and is
drawn again with the same selection once the editor exits. The new tab is what
gives the file a whole window even when the panel runs in a dock.
When the selection is a directory it is opened in the panel, exactly like the
:ref:`enter_dir <file-manager-shortcuts>` shortcut. When it is a file, the panel
opens it in kitty's editor (:opt:`editor`, :envvar:`VISUAL` or
:envvar:`EDITOR`) in a new tab, and is drawn again with the same selection once
the editor exits. The new tab is what gives the file a whole window even when
the panel runs in a dock.
""",
)
map(
@@ -105,7 +106,7 @@ map(
'enter_dir right enter_dir',
long_text="""
Move the panel into the selected directory without changing the shell's working
directory. Use the :ref:`activate <file-manager-shortcuts>` shortcut to also
directory. Use the :ref:`cd_here <file-manager-shortcuts>` shortcut to also
change the shell's directory.
""",
)