Commit Graph
79 Commits
Author SHA1 Message Date
Kovid Goyal de130787f6 Make the charsets code useable in kittens 2019-01-23 11:33:45 +05:30
Kovid Goyal e0b3bb1830 Move URL parser enum into parser function 2018-12-04 06:59:03 +05:30
Kovid Goyal 47ec372c30 Fix hover detection of URLs not working when hovering over the first colon and slash characters in short URLs
Fixes #1201
2018-12-04 06:52:26 +05:30
Kovid Goyal ab97646576 Have line_as_ansi indicate when the output is truncated 2018-11-20 11:13:49 +05:30
Kovid Goyal ee3ce3c7d8 Move cell_as_sgr to line.c 2018-09-30 08:58:33 +05:30
Dominique Martinet 2fe17aa889 cursor_as_sgr now works on GPUCells becomes cell_as_sgr 2018-09-22 19:10:09 +09:00
Dominique Martinet c421d3bb59 line_as_ansi: don't reset SGR at start of line
less does not carry the mode over from the previous line anyway, let's
save a few bytes for every line
2018-09-22 19:10:09 +09:00
Dominique Martinet a4c2a9ef0d line_as_ansi: only compute sgr if needed 2018-09-22 18:02:11 +09:00
Dominique Martinet ee39d7ba14 line_as_ansi: remove dead undefs
CHECK_BOOL, CHECK_COLOR and WRITE_COLOR have been removed in
commit 27cd303a05 ("Centralize code to convert to SGR")
2018-09-22 18:02:11 +09:00
Luflosi 1d91edfb00 dont -> don't 2018-08-29 03:18:25 +02:00
Kovid Goyal 000c1cf306 Implement support for emoji skin tone modifiers
Fixes #787
2018-08-04 10:06:25 +05:30
Kovid Goyal e5a720c6fa Fix detection of URLs in HTML source code (URLs inside quotes)
Fixes #785
2018-08-03 12:28:23 +05:30
Kovid Goyal 8dea5b3e3e Reduce data sent to GPU per draw by 30%
Split up the Cell structure into a CPUCell and a GPUCell. Only the
GPUCell part needs to be sent to the GPU. Should make kitty use even
less system resources and make a performance difference on systems where
the GPU bandwidth is constrained.

Also allows adding more CPU only data in the future without affecting
GPU bandwidth. For example, hyperlinks or more combining characters.
2018-05-27 21:25:09 +05:30
Kovid Goyal 6f2d63eb87 Implement SGR dim
kitty now supports the SGR DIM escape code, which makes text fade into
the background. It works by alpha blending the text color into the
background color. Fixes #446
2018-05-20 10:43:26 +05:30
Kovid Goyal 2cec0908a5 Fix a segfault when getting the contents of the scrollback buffer as text
Fixes #398
2018-03-16 21:10:48 +05:30
Kovid Goyal 527255e3a1 Fix compilation with gcc 8
Apparently some nitwit Linux distros have made an unreleased compiler
their default compiler. Fixes #376

Fixes various new warnings that GCC 8 issues
2018-03-12 10:38:12 +05:30
Kovid Goyal 80301d465b Handle non-BMP combining characters
Use a level of indirection to store combining characters. This allows
combining characters to be stored using only two bytes, even if they are
after USHORT_MAX
2018-01-18 16:25:42 +05:30
Kovid Goyal 409bd37db5 Store combining chars as an array in the Cell
Makes it easier to increase the number of combining chars if needed,
rather than storing them as a mask.
2018-01-18 14:10:58 +05:30
Kovid Goyal 5faa649452 Drop the dependency on libunistring 2018-01-18 00:09:40 +05:30
Kovid Goyal e5b9bd2e5a Implement @get-text 2018-01-09 22:48:24 +05:30
Kovid Goyal 7ed835cf13 Fix a crash when detecting URLs continued onto multiple lines
Fixes #244
2017-12-27 06:35:09 +05:30
Kovid Goyal 0fcce6ec58 Remove trailing whitespace from native code files 2017-12-20 08:44:47 +05:30
Kovid Goyal 95683c658b When hovering over a URL, highlight the URL fully even if it continues over multiple lines. Note that URL detection has not changed. A URL will be detected only if the mouse hovers over the line containing the start of the URL. 2017-12-13 11:11:13 +05:30
Kovid Goyal 27cd303a05 Centralize code to convert to SGR
Conversion from formatting attributes to SGR now always goes through a
Cursor.
2017-12-04 10:51:06 +05:30
Kovid Goyal 9ed980a511 More 32bit fixes 2017-11-30 00:02:44 +05:30
Kovid Goyal e5d411b80d Refactor font code
DRYer with global state stored in fewer places. And only round-tripping
through python for font selection, not face creation.
2017-11-11 18:14:22 +05:30
Kovid Goyal 0b8e8bff16 Infra to display rendered strings as images for testing 2017-11-09 16:55:42 +05:30
Kovid Goyal f25d2ea540 Rip out the old sprite update code 2017-11-09 16:45:45 +05:30
Kovid Goyal 646e8dab0a Fix regression in handling zero cells caused by refactoring 2017-11-09 16:45:44 +05:30
Kovid Goyal 3643a78b18 Start work on line based rendering 2017-11-09 16:45:44 +05:30
Kovid Goyal 21ed07d7ce Ensure python type objects are declared in onlya single unit 2017-11-01 13:14:50 +05:30
Kovid Goyal 27a1f27e59 Fix crash caused if a unicode combing character is sent before any text 2017-11-01 11:12:22 +05:30
Kovid Goyal e6f758b986 Simplify line_text_at() 2017-10-27 11:19:57 +05:30
Kovid Goyal a92b3c605f Move the text attributes out of the char type
This means that more text attributes can be added in the future (there
are 8 bits available) and there is no need to keep bit twiddling when
accessing the chars themselves. Also means less data needs to be sent to
the GPU. Cell size does not change since there were currently 2 unused
bytes because of alignment.
2017-09-16 11:02:42 +05:30
Kovid Goyal 85ed5c1515 Remove unnecessary conditional operators 2017-09-16 09:43:43 +05:30
Kovid Goyal 28430a4104 Fix wide chars not being rendered 2017-09-15 11:43:05 +05:30
Kovid Goyal 464291bbb1 Port click on URL code to C 2017-09-15 10:45:27 +05:30
Kovid Goyal ed3427f349 Dont use the python unicodedata module as we use libunistring
No sense in loading two hude unicode datasets into memory
2017-09-15 10:45:27 +05:30
Kovid Goyal 271b623f82 More URL detection tests 2017-09-15 10:45:25 +05:30
Kovid Goyal 88d896e745 Move function to detect URLs into C code 2017-09-15 10:45:25 +05:30
Kovid Goyal 63882e1fdc Make selection smarter
It now does not add trailing blank cells on selected lines to the
selection.
2017-09-15 10:45:19 +05:30
Kovid Goyal 5103381c27 DRYer 2017-09-15 10:45:19 +05:30
Kovid Goyal 3274327fe7 Speedup as_unicode by avoiding an unnecessary malloc/free 2017-09-15 10:45:18 +05:30
Kovid Goyal bc97cfa024 Use a null to represent a blank rather than a space
This has performance benefits when clearing (can use a single
memset). Also allows detecting trailing whitespace on lines correctly.
2017-09-15 10:45:16 +05:30
Kovid Goyal c4680aae2c Track sprite positions in the Cell structure 2017-09-15 10:45:15 +05:30
Kovid Goyal fe764ab6b6 oops 2017-09-15 10:45:08 +05:30
Kovid Goyal 4fd8c7cfaa DRYer 2017-09-15 10:45:08 +05:30
Kovid Goyal 37f0cf86d0 Migrated line.c 2017-09-15 10:45:07 +05:30
Kovid Goyal 69b187a743 Split up the color field into fg/bg colors
Avoid a lot of unnecessary masking as well as unaligned read/writes
2017-05-15 12:06:06 +05:30
Kovid Goyal ff966f667c Fix newlines being inserted at wrapping boundaries when copying. Fixes #55 2017-03-10 10:02:22 +05:30