Change default binding for T

See #6314 and #2907
This commit is contained in:
Florian Bruhin 2021-03-24 09:29:41 +01:00
parent 88b83c296c
commit ff63d0c1b0
5 changed files with 12 additions and 3 deletions

View File

@ -27,6 +27,8 @@ Deprecated
driver was dropped. Newer Qt 5.12.x versions are still fully supported.
- The `--force` argument for `:tab-only` is deprecated, use `--pinned close`
instead.
- Using `:tab-focus` without an argument or count is now deprecated, use
`:tab-next` instead.
Added
~~~~~
@ -82,6 +84,9 @@ Changed
- When an external file selector is used, some additional validation is done on
the picked files now, so that errors are shown if e.g. a directory is selected
when a file was expected.
- The default binding for `T` (`:tab-focus`) got changed so that it fills the
command line with `:tab-focus` if used without a count (instead of being
equivalent to `:tab-next` in that case).
Fixed
~~~~~

View File

@ -624,7 +624,7 @@ Default:
* +pass:[Sh]+: +pass:[history]+
* +pass:[Sq]+: +pass:[bookmark-list]+
* +pass:[Ss]+: +pass:[set]+
* +pass:[T]+: +pass:[tab-focus]+
* +pass:[T]+: +pass:[set-cmd-text -sr :tab-focus]+
* +pass:[U]+: +pass:[undo -w]+
* +pass:[V]+: +pass:[mode-enter caret ;; selection-toggle --line]+
* +pass:[ZQ]+: +pass:[quit]+

View File

@ -983,6 +983,9 @@ class CommandDispatcher:
self._tab_focus_stack(index)
return
elif index is None:
message.warning(
"Using :tab-focus without count is deprecated, "
"use :tab-next instead.")
self.tab_next()
return

View File

@ -3336,7 +3336,7 @@ bindings.default:
<Ctrl-Shift-W>: close
D: tab-close -o
co: tab-only
T: tab-focus
T: set-cmd-text -sr :tab-focus
gm: tab-move
gK: tab-move -
gJ: tab-move +

View File

@ -192,7 +192,8 @@ Feature: Tab management
And I open data/numbers/3.txt in a new tab
And I run :tab-focus 2
And I run :tab-focus
Then the following tabs should be open:
Then the warning "Using :tab-focus without count is deprecated, use :tab-next instead." should be shown
And the following tabs should be open:
- data/numbers/1.txt
- data/numbers/2.txt
- data/numbers/3.txt (active)