Commit Graph

64 Commits

Author SHA1 Message Date
Kovid Goyal
48e7ebb838 make gofmt happy 2023-03-10 13:03:51 +05:30
Kovid Goyal
0e5ed29d83 Fix generation of url regex for Go 2023-03-09 19:00:56 +05:30
Kovid Goyal
09ceb3c0be Start work on porting hints kitten to Go 2023-03-09 19:00:56 +05:30
Kovid Goyal
1bf911a81b Generate the rowcol diacrticis for Go as well 2023-03-03 14:39:38 +05:30
Sergei Grechanik
d63eeada73 Image placement using Unicode placeholders
This commit introduces the Unicode placeholder image placement method.
In particular:
- Virtual placements can be created by passing `U=1` in a put command.
- Images with virtual placements can be displayed using the placeholder
  character `U+10EEEE` with diacritics indicating rows and columns.
- The image ID is indicated by the foreground color of the placeholder.
  Additionally, the most significant byte of the ID can be specified via
  the third diacritic.
- Underline color can be optionally used to specify the placement ID.
- A bug was fixed, which caused incomplete image removal when it was
  overwritten by another image with the same ID.
2023-02-21 18:23:16 -08:00
Kovid Goyal
53e33a80ba Start work on porting unicode input kitten to Go 2023-02-14 21:33:21 +05:30
Kovid Goyal
836b652f4d Enable checks for unused noqa 2023-01-09 17:28:35 +05:30
Kovid Goyal
7fe5d7b58f Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
ffefd0f581 Cleanup previous PR 2022-11-18 10:42:06 +05:30
pagedown
76669ad14d Note the Unicode version in the generated files
Files generated from the same Unicode version will be consistent
regardless of the date they were built.
2022-11-18 13:01:32 +08:00
Kovid Goyal
36631ddc49 ... 2022-11-17 20:25:35 +05:30
Kovid Goyal
e5e8cc72c6 Make the Unicode database version used available 2022-11-17 20:11:50 +05:30
Kovid Goyal
5703a3370e Move wcswidth into its own package as it is very slow to build 2022-11-14 15:41:50 +05:30
Kovid Goyal
4ab5456ead Less layering 2022-11-14 15:41:49 +05:30
Kovid Goyal
05d768d8df Generate a wcwidth for Go as well 2022-11-14 15:41:49 +05:30
Kovid Goyal
e8b19e08fa Fix non-renderable combining chars causing some text to not be rendered on Linux
The test for non-renderable chars was broken and the variation selectors
were not included in the test. Fixes #4444
2022-01-05 22:33:53 +05:30
Kovid Goyal
384b2f8462 Add roundtrip and cursor positioning tests for all three zero width chars 2022-01-05 08:57:14 +05:30
Kovid Goyal
d875615c03 Fix a regression in the handling of some combining characters such as zero width joiners
Fixes #4439
2022-01-05 08:50:55 +05:30
Kovid Goyal
f0e8ab8f31 Drop support for python 3.6
It is being EOLed next month (https://www.python.org/dev/peps/pep-0494/)
which is when I expect the next kitty release as well
2021-11-18 22:44:41 +05:30
Kovid Goyal
6f19fd5912 Add more type annotations 2021-10-27 10:50:24 +05:30
Kovid Goyal
d52e5fab1e Merge branch 'master' of https://github.com/python-pitfalls/kitty 2021-10-25 08:43:08 +05:30
Naelson Douglas
9f442eb7e4 removed a consider-using-in pitfall case 2021-10-25 00:04:23 -03:00
Kovid Goyal
fbf47f75d5 Fix soft hyphens not being preserved when round tripping text through the terminal
Also roundtrip all characters in the Cf category.

Characters with the DI (Default Ignorable) property are now
preserved but not rendered and treated as zero-width
as per the unicode standard.
See https://www.unicode.org/faq/unsup_char.html
2021-10-07 12:44:22 +05:30
Kovid Goyal
3633049ba5 Forgot to include \r in the url regex 2021-07-19 18:09:00 +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
9838a336d5 Make wcwidth-std.h more generally includeable 2021-03-31 15:18:19 +05:30
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
444080f320 Make wcswidth useable in a streaming fashion 2020-09-21 15:55:22 +05:30
Kovid Goyal
628b92f20b Speed up is_ignored_char in the common case 2020-08-06 18:05:33 +05:30
Kovid Goyal
8f9616c230 Speed up wcwidth_std in the common case 2020-08-06 17:57:57 +05:30
Kovid Goyal
a835b56a51 Speed up is_combining_char() in the common case 2020-08-06 17:45:40 +05:30
Kovid Goyal
5e48ae8bac pep8 2020-05-12 22:54:08 +05:30
Kovid Goyal
0b9a37139e Render any flag pair in two cells not just known ones 2020-04-06 23:00:34 +05:30
Kovid Goyal
24197dc422 Render known country flags designated by a pair of unicode codepoints in two cells instead of four. 2020-04-06 22:16:59 +05:30
Kovid Goyal
9bc2ab3245 Function to detect flag pairs 2020-04-06 21:16:14 +05:30
Kovid Goyal
bf4e8c490c Update to Unicode 13.0
Fixes #2513
2020-04-06 18:59:35 +05:30
Kovid Goyal
5956277863 All defs are now typed 2020-03-14 14:37:11 +05:30
Kovid Goyal
8a34fede55 More typing work 2020-03-06 08:35:23 +05:30
Kovid Goyal
8ad62106e0 No global typing issues in all code (excluding tests) 2020-03-04 08:10:20 +05:30
Kovid Goyal
b709ee6842 Add a function to check if a codepoint is a symbol 2019-10-01 18:57:06 +05:30
Luflosi
5f855ce547 Use context managers to open files
Inspired by d50a6ddc1b.
2019-08-01 13:21:26 -05:00
Kovid Goyal
5b7eac280c DRYer
Store expected value of VS15 in only one place
2019-03-06 13:53:09 +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
094ddd9333 Round-trip the zwj unicode character
Rendering of sequences containing zwj is still not implemented, since it
can cause the collapse of an unbounded number of characters into a
single cell. However, kitty at least preserves the zwj by storing it as
a combining character.
2018-08-04 18:29:45 +05:30
Kovid Goyal
000c1cf306 Implement support for emoji skin tone modifiers
Fixes #787
2018-08-04 10:06:25 +05:30
Kovid Goyal
a7d9c63a4e wcwidth() for not assigned code points should be -4
That way, wcswidth() computes their width as 1, which matches how they
are rendered
2018-06-14 10:27:42 +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
ad1109b6fe Hints kitten: Overhaul making it more intelligent
It now uses information about the geometry of the screen.
So URLs that stretch over multiple lines are detected even if there is a
hard line break in between (some programs like mutt generate these).
2018-05-19 14:31:00 +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