71 Commits

Author SHA1 Message Date
Kovid Goyal
3633049ba5
Forgot to include \r in the url regex 2021-07-19 18:09:00 +05:30
Kovid Goyal
3d51835b9b
Avoid unneccessary mallocs and copying when return code points for word 2021-06-28 05:56:49 +05:30
Kovid Goyal
f358d76409
Fix type sig 2021-06-28 05:51:49 +05:30
Kovid Goyal
ce486e9244
Move the if condition out of the inner loops 2021-06-27 21:09:06 +05:30
Kovid Goyal
691b7215a0
Unicode input kitten: Fix searching when a word has more than 1024 matches
Fixes #3773
2021-06-27 21:04:43 +05:30
Kovid Goyal
86ce11134a
Unicode input kitten: Fix a regression in 0.20.0 that broke keyboard handling when the num lock or caps lock modifiers were engaged.
Fixes #3587
2021-05-07 06:55:25 +05:30
Kovid Goyal
ff1585acfe
Unicode input: Make diamond a synonym for gem
Fixes #3437
2021-04-02 12:53:58 +05:30
Kovid Goyal
e09ed038e2
Port key handling in more kittens
Also fix decoding of enter/f3 key events
2021-01-16 20:52:15 +05:30
Kovid Goyal
31cb68840a
Merge branch 'bugfix-unicode-names-input' of https://github.com/purxiz/kitty
Fixes #3221
2021-01-07 14:18:24 +05:30
purxiz
89c62377da fix type error
I moved the location of the check for an overflowing index to avoid a type error that was revealed by mypy. I also think this is a better place to put it from a code standpoint in general...
2021-01-06 13:24:38 -06:00
purxiz
85afda8832 fixes incorrect hint base
The bases for the hint were being decoded as base 16, despite being displayed as base 36 (0-9, a-z). This fix makes it so typing 'search string .index' returns the unicode char at the expected index, based on what is displayed by the program.

It also slightly changes the behavior. Before, only the selected result would appear. For example, musical note `musical note .18` would only show a single result, since there was only a single result at index 18. Now, searching by index doesn't remove codepoints/results, it simply highlights the result at the correct index for you.
2021-01-06 13:07:41 -06:00
Kovid Goyal
d09666aba9
Unicode input kitten: Add symbols from NERD font
These are mostly Private Use symbols not in any standard,
however they are common enough to be useful.

Fixes #2972
2020-09-22 19:47:39 +05:30
Kovid Goyal
a835b56a51
Speed up is_combining_char() in the common case 2020-08-06 17:45:40 +05:30
Kovid Goyal
57e6e7b2c5
Use ctrl+[] for changing tabs in unicode input as ctrl+tab is taken on macOS
ctrl+tab remains in addition for backwards compat
2020-06-26 12:29:42 +05:30
Kovid Goyal
bf4e8c490c
Update to Unicode 13.0
Fixes #2513
2020-04-06 18:59:35 +05:30
Kovid Goyal
382c31ddf2
Use a stub rather than TYPE_CHECKING 2020-03-15 13:27:40 +05:30
Kovid Goyal
149ae2866a
more typing work 2020-03-12 08:10:51 +05:30
Kovid Goyal
3c2f3ecd8e
Fix #2420 2020-03-09 17:24:51 +05:30
Kovid Goyal
5bdb405635
More typing work 2020-03-09 08:56:02 +05:30
Kovid Goyal
77e9460eea
Make mypy a bit stricter 2020-03-05 19:57:28 +05:30
Kovid Goyal
f05890719d
Add type checking for the various CLI options objects 2020-03-05 15:47:12 +05:30
Kovid Goyal
5730ce5f53
More typing work 2020-03-03 20:18:24 +05:30
Kovid Goyal
27524bfc3d
Restore global key definitions so as not to break third party kittens that might use them 2020-03-03 15:06:10 +05:30
Kovid Goyal
8843ded1c9
Refactor key encoding
Cannot have key names in global namespace as not all key names are valid
python identifiers. So move them into a dict.
2020-03-03 14:54:30 +05:30
Kovid Goyal
62e273c5bb
unicode input kitten: Allow pressing :kbd:ctrl+tab to change the input mode
Fixes #2343
2020-02-08 13:29:50 +05:30
Kovid Goyal
738878c2ff
unicode input kitten: Add an option :option:kitty +kitten unicode_input --emoji-variation to control the presentation variant of selected emojis
Fixes #2139
2019-11-17 13:13:37 +05:30
Kovid Goyal
b709ee6842
Add a function to check if a codepoint is a symbol 2019-10-01 18:57:06 +05:30
Kovid Goyal
8e1ed2f8c3
Update unicode data to 12.1 2019-08-02 14:48:18 +05:30
Kovid Goyal
38bc90f724
unicode_input kitten: Fix a regression that broke using indices to select recently used symbols. 2019-06-17 07:11:07 +05:30
Luflosi
2b095f720e
Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
Luflosi
a792c94ccf
Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
6f5ff05c56
Merge branch 'master' of https://github.com/fdev31/kitty 2019-04-19 14:09:48 +05:30
fdev31
2376b7c255 implement fast browsing of the unicode input
useful for zones with icons
2019-04-18 22:52:06 +02:00
Kovid Goyal
facd353228
Update to using the Unicode 12 standard 2019-03-06 13:58:16 +05:30
Kovid Goyal
3e26f96744
Add some common synonyms for unicode word searching
Fixes #1133
2018-11-13 15:46:33 +05:30
Kovid Goyal
4a8c4c4601
Unicode input: Fix an error when searching for the string 'fir'
Fixes #1035
2018-09-28 19:01:20 +05:30
Kovid Goyal
e498cedf56
remove unused import 2018-09-27 08:52:40 +05:30
Daniel Hahler
3323ddcdef unicode_input: use reverse mode for menu selection 2018-09-26 22:50:22 +02:00
Kovid Goyal
000c1cf306
Implement support for emoji skin tone modifiers
Fixes #787
2018-08-04 10:06:25 +05:30
Kovid Goyal
2c3235d452
Remove need to call super-class on_resize method 2018-07-15 16:19:54 +05:30
Kovid Goyal
7214b66aa5
A new tui API for simple line editing
Handles basic line-editing with the extended keyboard protocol and
support for wide chars.
Currently used by the unicode input kitten.
2018-06-14 13:11:48 +05:30
Kovid Goyal
61dd52b50f
Ignore the non-characters from the unicode standard in addition to ignoring the control characters 2018-06-14 10:20:13 +05:30
Kovid Goyal
345b3437f4
Add a config option to set the EDITOR kitty uses
Useful on systems that make it hard to set system-wide environment
variables. See #580
2018-05-28 12:24:09 +05:30
Kovid Goyal
0b93b85cf2
Dont use case range in names.h as it prevents compilation with Visual Studio 2018-05-01 11:27:10 +05:30
Kovid Goyal
f7001ea068
Fix character names for control characters not being read from unicode database
Also allow unicode_names.c to be compiled with python 2 so I can re-use
it in calibre.
2018-05-01 10:13:58 +05:30
Kovid Goyal
0b99bb534f
Unicode input: When searching by name search for prefix matches as well as whole word matches
So now hori matches both "hori" and "horizontal". Switched to a
prefix-trie internally.
2018-04-24 07:45:20 +05:30
Kovid Goyal
20c42ab519
tui: Allow handlers to finalize() as well as initialize() 2018-04-22 13:14:25 +05:30
Kovid Goyal
83a3d99824
Make --help work for all kittens 2018-04-12 09:33:50 +05:30
Kovid Goyal
2cf8c6aea7
Refactor the kittens framework
Make it possible to perform arbitrary actions with the kittens output
and also allow running kittens from standalone python files.
2018-04-11 13:09:31 +05:30
alexander white
f99e368831 Fixed crash on tab-completing without any search results. 2018-04-07 14:10:16 -04:00