144 Commits

Author SHA1 Message Date
Kovid Goyal
d548a6fcf4 rename typing module to avoid conflicts with stdlib typing 2025-04-28 09:20:10 +05:30
Kovid Goyal
96d5c9c7c6 A new option to clear selections when they no longer reflect the contents of the clipboard 2025-03-12 11:41:27 +05:30
Kovid Goyal
da1626090a Update codebase to Python 3.10 using pyupgrade 2025-02-03 10:56:50 +05:30
Kovid Goyal
8931062a70 hints kitten: Workaround for some broken light color themes that make the hints text color too low contrast to read
Fixes #7330
2025-01-17 20:22:10 +05:30
Kovid Goyal
8c1e365eb5 hints kitten: Allow clicking on matched text to select it in addition to typing the hint 2024-05-14 15:22:03 +05:30
Kovid Goyal
c3c99113c7 hints kitten: Use default editor rather than hardcoding vim to open file at specific line
Fixes #7186
2024-03-04 21:49:06 +05:30
Kovid Goyal
a5f3142514 hints kitten: The option to set the text color for hints now allows arbitrary colors
Fixes #7150
2024-02-25 10:02:38 +05:30
Kovid Goyal
8cc2cad4d9 Use list of legal chars in URL from the WHATWG standard
Notably this excludes some ASCII chars: <>{}[]`|
See https://url.spec.whatwg.org/#url-code-points

Fixes #7095
2024-02-05 13:27:22 +05:30
Kovid Goyal
77292a16d6 Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
dc6edf9191 Improve the docs for how to match multi-line hints
See #6692
2023-10-17 15:23:58 +05:30
Kovid Goyal
0a2f164062 Change kitty +kitten -> kitten in docs
All kittens except for the broadcast and panel kittens have now been
ported to Go and so can be run with just kitten rather than kitty
+kitten. So update the docs to use this canonical form for launching
kittens
2023-09-21 12:25:02 +05:30
Kovid Goyal
da1276d84a Correct the naming of the window arg to call_remote_control 2023-06-10 09:47:37 +05:30
Kovid Goyal
7b6d11fd1e Fix rendering of :doc: links with explicit titles in help text in the terminal 2023-04-26 16:46:20 +05:30
Kovid Goyal
bb33c66570 Fix #6213 2023-04-26 16:38:25 +05:30
Kovid Goyal
e4611d0c81 ... 2023-03-17 09:02:58 +05:30
Kovid Goyal
b76b0c61ed Port custom processor for hints 2023-03-10 10:45:37 +05:30
Kovid Goyal
69916ca4e8 Remove python implementation of hints 2023-03-10 07:16:25 +05:30
Kovid Goyal
5b3f5dd02d Port all remaining hints matching tests 2023-03-09 20:53:46 +05:30
Kovid Goyal
09ceb3c0be Start work on porting hints kitten to Go 2023-03-09 19:00:56 +05:30
pagedown
4c9d90efbb hints kitten: Perform copy action with --program when matching linenum 2023-03-02 10:30:17 +08:00
Kovid Goyal
eb6d777790 ... 2023-03-01 20:34:09 +05:30
Kovid Goyal
81f8ed6b45 Use @ rather than # for named buffers prefix char
Matches existing use of @ for clipboard. Also @ doesnt need to be quoted
in most shells.
2023-03-01 19:54:03 +05:30
pagedown
854529c443 hints kitten: Allow copying matches to named buffers 2023-03-01 22:10:24 +08:00
Kovid Goyal
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
7e1380cc0d Start work on giving GLFW a proper clipboard API 2022-09-08 12:45:34 +05:30
Kovid Goyal
295743a96e Fix ref to launch doc 2022-09-02 16:31:21 +05:30
Kovid Goyal
9cec924f32 hints kitten: Allow using launch as the program to run, to open the result in a new kitty tab/window/etc.
Fixes #5462
2022-09-02 16:23:00 +05:30
Kovid Goyal
afada84f52 Cleanup previous PR
Use wcswidth() for line width calculation. Works with emoji and ignores
escape codes automatically. Add changelog entry.
2022-08-31 08:01:52 +05:30
Trygve Aaberge
03720402a7 Fix hints sometimes matching next line as part of URL
For URLs where there's fewer characters left to the right edge of the
window than the number of escape characters in the line, the next line
would be included in the URL, as if the URL went all the way to the
right edge.

For example with a 40 chars wide terminal, if you run:

    echo -e '\e[31m1\e[m https://github.com/kovidgoyal/kitty\ntest'

And launch the hints kitten, you'll see that test on the next line will
be included in the URL.

This happened because the calculation for filling the rest of the line
with NUL characters counted the escape characters as well as the visible
characters, so it filled in too few characters.

This is a regression introduced in commit 91966712.
2022-08-30 22:24:58 +02:00
Kovid Goyal
98f6e24106 Move block outside try/except as it doesnt need to be in there 2022-06-06 08:17:15 +05:30
Kovid Goyal
cd7751681d hints kitten: Fix surrounding quotes/brackets and embedded carriage returns not being removed when using line number processing
Fixes #5170
2022-06-05 18:07:16 +05:30
pagedown
288d16f7be Docs: Minor tweaks to the help documentation of hints kitten 2022-04-24 17:18:45 +08:00
Kovid Goyal
e522095fae ... 2022-03-26 07:39:16 +05:30
pagedown
746cb3684a Eliminate flickering when hints kitten exits 2022-03-25 22:53:38 +08:00
pagedown
16c6545e93 Report overlay ready in case of no match 2022-03-25 22:52:35 +08:00
Kovid Goyal
15e3e8d8b1 typo 2022-03-25 16:18:00 +05:30
Kovid Goyal
3c67e991c2 Allow defining actions to take when pasting
Fixes #4873
2022-03-24 17:22:46 +05:30
Kovid Goyal
bfb8532c52 Jump through the hoops needed to ensure error reporting is done in case of early termination of kittens that use overlay ready notifications 2022-03-24 08:49:36 +05:30
Kovid Goyal
6dc1617429 Avoid flicker when starting kittens such as the hints kitten
Fixes #4674
2022-03-23 15:55:11 +05:30
Kovid Goyal
cb4a9d89cf Cleanup linenum matching and add some tests 2022-02-23 23:06:19 +05:30
Kovid Goyal
7800c598f6 hints kitten: Fix a regression that broke recognition of path:linenumber:colnumber
Fixes #4675
2022-02-23 22:38:54 +05:30
Kovid Goyal
6bfb6da0ad Make the regex for sgr stripping tighter 2022-02-15 22:33:51 +05:30
Kovid Goyal
56a5738018 Remove unused code 2022-02-15 22:22:07 +05:30
Kovid Goyal
919667129f hints kitten: Avoid double scan of input text 2022-02-15 22:21:31 +05:30
Kovid Goyal
53716c084b hints kitten: Strip prompt mark escape codes 2022-02-15 22:04:10 +05:30
pagedown
d40e6a9ece hints kitten: Match and strip Unicode single and double quotes 2022-02-11 14:59:35 +08:00
pagedown
4a3ed62809 Refactor: More f-string for kittens 2022-01-29 20:23:34 +08:00
Kovid Goyal
b32edf54f8 hints kitten: Document how to choose the empty hint for multi key hints 2022-01-15 15:17:30 +05:30
Kovid Goyal
b2bfc4408e Fix common single letter extension files not being detected
Fixes #4491
Fixes #4492
2022-01-10 14:20:18 +05:30
Kovid Goyal
dae8ae33f0 hints kitten: Fix matching of filenames enclosed in quotes or brackets not stripping the surrounding quotes properly. Fixes #4419 2022-01-04 10:58:31 +05:30