fix(search): give the in-place search a usable shortcut #55
No files matched your search
@@ -81,7 +81,8 @@ Deux fonctions FWS ne demandent aucune touche :
|
|||||||
| `Ctrl+Shift+X` | Va au prompt suivant. |
|
| `Ctrl+Shift+X` | Va au prompt suivant. |
|
||||||
| `Ctrl+Shift+H` | Affiche tout l'historique dans un pager. |
|
| `Ctrl+Shift+H` | Affiche tout l'historique dans un pager. |
|
||||||
| `Ctrl+Shift+G` | Affiche la sortie de la dernière commande dans un pager. |
|
| `Ctrl+Shift+G` | Affiche la sortie de la dernière commande dans un pager. |
|
||||||
| `Ctrl+Shift+/` | Recherche dans l'historique. |
|
| `Ctrl+Shift+/` | Recherche dans l'historique dans un pager. |
|
||||||
|
| `Ctrl+Shift+Alt+S` | Recherche avec surlignage sur place (`n`/`N` pour naviguer, `Échap` pour quitter). |
|
||||||
|
|
||||||
## Fenêtres
|
## Fenêtres
|
||||||
|
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ _branch=feat/file-manager-panel
|
|||||||
### Publication automatique
|
### Publication automatique
|
||||||
|
|
||||||
`version`, à la racine, est la source de vérité des releases. Il suit la version
|
`version`, à la racine, est la source de vérité des releases. Il suit la version
|
||||||
du fork FWS (`0.1.12`), pas la version amont de kitty embarquée dans le paquet :
|
du fork FWS (`0.1.13`), pas la version amont de kitty embarquée dans le paquet :
|
||||||
c'est elle qui nomme le tag, la release et le paquet
|
c'est elle qui nomme le tag, la release et le paquet
|
||||||
`fws-kitty-<version>-<rel>`. Il doit rester égal à `pkgver` dans
|
`fws-kitty-<version>-<rel>`. Il doit rester égal à `pkgver` dans
|
||||||
`packaging/PKGBUILD` et à la version affichée par `fws-kitty`
|
`packaging/PKGBUILD` et à la version affichée par `fws-kitty`
|
||||||
|
|||||||
+3
-1
@@ -30,7 +30,9 @@ Search scrollback in place :sc:`search_scrollback_prompt`
|
|||||||
========================== =======================
|
========================== =======================
|
||||||
|
|
||||||
The in-place search highlights every match without replacing the screen with a
|
The in-place search highlights every match without replacing the screen with a
|
||||||
pager. Prefix the query with ``\c`` to match case sensitively and with ``\r``
|
pager. It is bound to :kbd:`kitty_mod+alt+s` (:kbd:`Ctrl+Shift+Alt+S` by
|
||||||
|
default) and can also be run with :code:`kitten @ action
|
||||||
|
search_scrollback_prompt`. Prefix the query with ``\c`` to match case sensitively and with ``\r``
|
||||||
to use a regular expression; both modifiers can be combined. Write a doubled
|
to use a regular expression; both modifiers can be combined. Write a doubled
|
||||||
backslash (``\\c``, ``\\r``) to search for those prefixes literally. While the search
|
backslash (``\\c``, ``\\r``) to search for those prefixes literally. While the search
|
||||||
is active, :kbd:`n` jumps to the next match, :kbd:`N` to the previous one and
|
is active, :kbd:`n` jumps to the next match, :kbd:`N` to the previous one and
|
||||||
|
|||||||
@@ -263,6 +263,11 @@ Detailed list of changes
|
|||||||
:kbd:`kitty_mod+H` is pressed. The panel can also be started with
|
:kbd:`kitty_mod+H` is pressed. The panel can also be started with
|
||||||
:code:`kitty +kitten help`.
|
:code:`kitty +kitten help`.
|
||||||
|
|
||||||
|
- The in-place scrollback search got a usable default shortcut: it was bound
|
||||||
|
to :kbd:`kitty_mod+shift+f`, the same physical key as :ac:`move_window_forward`
|
||||||
|
(which allows the shifted fallback), so the last definition won and the search
|
||||||
|
never opened. It is now on :kbd:`kitty_mod+alt+s`.
|
||||||
|
|
||||||
- The keyboard shortcuts panel ellipsizes a long action name inside its own
|
- The keyboard shortcuts panel ellipsizes a long action name inside its own
|
||||||
column instead of letting the edge of the dock cut it, shrinks its key column
|
column instead of letting the edge of the dock cut it, shrinks its key column
|
||||||
on very narrow docks so that a row always fits, and shows the full name of
|
on very narrow docks so that a row always fits, and shows the full name of
|
||||||
|
|||||||
@@ -424,10 +424,10 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) {
|
|||||||
if (get_bool_cli_val(cli_spec, "version")) {
|
if (get_bool_cli_val(cli_spec, "version")) {
|
||||||
if (isatty(STDOUT_FILENO)) {
|
if (isatty(STDOUT_FILENO)) {
|
||||||
printf("\x1b[3mkitty\x1b[23m \x1b[32m%s\x1b[39m created by \x1b[1;34mKovid Goyal\x1b[22;39m\n", KITTY_VERSION);
|
printf("\x1b[3mkitty\x1b[23m \x1b[32m%s\x1b[39m created by \x1b[1;34mKovid Goyal\x1b[22;39m\n", KITTY_VERSION);
|
||||||
printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.12\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n");
|
printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.13\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n");
|
||||||
} else {
|
} else {
|
||||||
printf("kitty %s created by Kovid Goyal\n", KITTY_VERSION);
|
printf("kitty %s created by Kovid Goyal\n", KITTY_VERSION);
|
||||||
printf("fws-kitty 0.1.12 by BlackAngelTV\n");
|
printf("fws-kitty 0.1.13 by BlackAngelTV\n");
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4159,13 +4159,14 @@ map('Search the scrollback within a pager', 'search_scrollback --allow-fallback=
|
|||||||
|
|
||||||
map(
|
map(
|
||||||
'Search and highlight the scrollback in place',
|
'Search and highlight the scrollback in place',
|
||||||
'search_scrollback_prompt kitty_mod+shift+f search_scrollback_prompt',
|
'search_scrollback_prompt kitty_mod+alt+s search_scrollback_prompt',
|
||||||
long_text="""
|
long_text="""
|
||||||
Search the scrollback without opening a pager. Every match is highlighted in
|
Search the scrollback without opening a pager. Every match is highlighted in
|
||||||
the scrollback and the ``[current/total]`` counter is shown in the window title.
|
the scrollback and the ``[current/total]`` counter is shown in the window title.
|
||||||
Prefix the query with ``\\c`` to match case sensitively and with ``\\r`` to use
|
Prefix the query with ``\\c`` to match case sensitively and with ``\\r`` to use
|
||||||
a regular expression. While a search is active, :kbd:`n` and :kbd:`N` jump to
|
a regular expression. While a search is active, :kbd:`n` and :kbd:`N` jump to
|
||||||
the next and previous match and :kbd:`Escape` ends the search.
|
the next and previous match and :kbd:`Escape` ends the search. The default
|
||||||
|
binding is :kbd:`kitty_mod+alt+s` (:kbd:`Ctrl+Shift+Alt+S` by default).
|
||||||
|
|
||||||
The :ac:`scrollback_search_next`, :ac:`scrollback_search_prev` and
|
The :ac:`scrollback_search_next`, :ac:`scrollback_search_prev` and
|
||||||
:ac:`clear_scrollback_search` actions can be mapped to other keys.
|
:ac:`clear_scrollback_search` actions can be mapped to other keys.
|
||||||
|
|||||||
Generated
+1
-1
@@ -937,7 +937,7 @@ defaults.map = [
|
|||||||
# search_scrollback
|
# search_scrollback
|
||||||
KeyDefinition(trigger=SingleKey(mods=256, key=47), definition='search_scrollback'),
|
KeyDefinition(trigger=SingleKey(mods=256, key=47), definition='search_scrollback'),
|
||||||
# search_scrollback_prompt
|
# search_scrollback_prompt
|
||||||
KeyDefinition(trigger=SingleKey(mods=257, key=102), definition='search_scrollback_prompt'),
|
KeyDefinition(trigger=SingleKey(mods=258, key=115), definition='search_scrollback_prompt'),
|
||||||
# new_window
|
# new_window
|
||||||
KeyDefinition(trigger=SingleKey(mods=256, key=57345), definition='new_window'),
|
KeyDefinition(trigger=SingleKey(mods=256, key=57345), definition='new_window'),
|
||||||
# new_os_window
|
# new_os_window
|
||||||
|
|||||||
@@ -29,6 +29,17 @@ class TestConfParsing(BaseTest):
|
|||||||
def test_conf_parsing(self):
|
def test_conf_parsing(self):
|
||||||
conf_parsing(self)
|
conf_parsing(self)
|
||||||
|
|
||||||
|
def test_default_search_shortcut(self):
|
||||||
|
from kitty.config import load_config
|
||||||
|
|
||||||
|
opts = load_config(overrides=())
|
||||||
|
keymap = opts.keyboard_modes[''].keymap
|
||||||
|
keys = [key for key, defns in keymap.items() if any(d.definition.split()[0] == 'search_scrollback_prompt' for d in defns)]
|
||||||
|
self.ae(len(keys), 1, 'the in-place search must have exactly one default shortcut')
|
||||||
|
# A shared trigger means the last definition wins silently and the search
|
||||||
|
# never opens, which is what happened with move_window_forward.
|
||||||
|
self.ae([d.definition.split()[0] for d in keymap[keys[0]]], ['search_scrollback_prompt'])
|
||||||
|
|
||||||
def test_launcher(self):
|
def test_launcher(self):
|
||||||
launcher(self)
|
launcher(self)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
pkgname=fws-kitty
|
pkgname=fws-kitty
|
||||||
# Fork version from the version file: it names the release and the package.
|
# Fork version from the version file: it names the release and the package.
|
||||||
# The upstream kitty release built inside is tracked by _kittyver below.
|
# The upstream kitty release built inside is tracked by _kittyver below.
|
||||||
pkgver=0.1.12
|
pkgver=0.1.13
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)'
|
pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)'
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ func ShowError(err error) {
|
|||||||
|
|
||||||
func (self *Command) version_string(formatter *markup.Context) string {
|
func (self *Command) version_string(formatter *markup.Context) string {
|
||||||
return fmt.Sprintln(formatter.Italic(self.CommandStringForUsage()), formatter.Opt(kitty.VersionString+kitty.VersionSuffix), "created by", formatter.Title("Kovid Goyal")) +
|
return fmt.Sprintln(formatter.Italic(self.CommandStringForUsage()), formatter.Opt(kitty.VersionString+kitty.VersionSuffix), "created by", formatter.Title("Kovid Goyal")) +
|
||||||
fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.12"), "by", formatter.Title("BlackAngelTV"))
|
fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.13"), "by", formatter.Title("BlackAngelTV"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *Command) ShowVersion() {
|
func (self *Command) ShowVersion() {
|
||||||
|
|||||||
Reference in new issue
Block a user