diff --git a/RACCOURCIS-CLAVIER.md b/RACCOURCIS-CLAVIER.md index e1ff126..c16d5e7 100644 --- a/RACCOURCIS-CLAVIER.md +++ b/RACCOURCIS-CLAVIER.md @@ -81,7 +81,8 @@ Deux fonctions FWS ne demandent aucune touche : | `Ctrl+Shift+X` | Va au prompt suivant. | | `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+/` | 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 diff --git a/README.md b/README.md index 75dd4e5..8a0b39f 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ _branch=feat/file-manager-panel ### Publication automatique `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 `fws-kitty--`. Il doit rester égal à `pkgver` dans `packaging/PKGBUILD` et à la version affichée par `fws-kitty` diff --git a/docs/basic.rst b/docs/basic.rst index e5c78d2..68ddddb 100644 --- a/docs/basic.rst +++ b/docs/basic.rst @@ -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 -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 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 diff --git a/docs/changelog.rst b/docs/changelog.rst index be989d1..57e0696 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -263,6 +263,11 @@ Detailed list of changes :kbd:`kitty_mod+H` is pressed. The panel can also be started with :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 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 diff --git a/kitty/launcher/main.c b/kitty/launcher/main.c index 4343a0b..60e22b4 100644 --- a/kitty/launcher/main.c +++ b/kitty/launcher/main.c @@ -424,10 +424,10 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) { if (get_bool_cli_val(cli_spec, "version")) { 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[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 { 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); } diff --git a/kitty/options/definition.py b/kitty/options/definition.py index a38dbf2..524a6b1 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -4159,13 +4159,14 @@ map('Search the scrollback within a pager', 'search_scrollback --allow-fallback= map( '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=""" 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. 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 -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 :ac:`clear_scrollback_search` actions can be mapped to other keys. diff --git a/kitty/options/types.py b/kitty/options/types.py index fa34ce6..a5d9623 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -937,7 +937,7 @@ defaults.map = [ # search_scrollback KeyDefinition(trigger=SingleKey(mods=256, key=47), definition='search_scrollback'), # 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 KeyDefinition(trigger=SingleKey(mods=256, key=57345), definition='new_window'), # new_os_window diff --git a/kitty_tests/options.py b/kitty_tests/options.py index 29cb79e..354b7e2 100644 --- a/kitty_tests/options.py +++ b/kitty_tests/options.py @@ -29,6 +29,17 @@ class TestConfParsing(BaseTest): def test_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): launcher(self) diff --git a/packaging/PKGBUILD b/packaging/PKGBUILD index 134705f..e106820 100644 --- a/packaging/PKGBUILD +++ b/packaging/PKGBUILD @@ -13,7 +13,7 @@ pkgname=fws-kitty # Fork version from the version file: it names the release and the package. # The upstream kitty release built inside is tracked by _kittyver below. -pkgver=0.1.12 +pkgver=0.1.13 pkgrel=1 pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)' arch=('x86_64' 'aarch64') diff --git a/tools/cli/help.go b/tools/cli/help.go index de9829a..7106776 100644 --- a/tools/cli/help.go +++ b/tools/cli/help.go @@ -31,7 +31,7 @@ func ShowError(err error) { 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")) + - 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() { diff --git a/version b/version index 0e24a92..7ac4e5e 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.1.12 +0.1.13