Commit Graph

249 Commits

Author SHA1 Message Date
Kovid Goyal
96793a296c
diff kitten has working syntax highlighting 2018-05-08 14:48:01 +05:30
Kovid Goyal
51d2c01bc1
Highlight changed in individual lines in chunks that have the same number of adds/removes 2018-05-04 15:35:11 +05:30
Kovid Goyal
be9d876997
find common prefix and suffix of two strings 2018-05-03 20:15:28 +05:30
Kovid Goyal
3f316c39d1
Dynamically allocate the scrollback history buffer
Reduces startup memory consumption when using very large scrollback
buffer sizes.
2018-05-03 15:17:02 +05:30
Kovid Goyal
0be0963dc7
Utility method to truncate formatted lines to specified width 2018-04-25 19:34:04 +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
James McCoy
a467e79144 Stop setting title to ";" when 0-length OSC 2 is received
Various programs send a 0-length title if no title is configured (e.g.,
(n)vim with 'title' unset, or mutt without ts_enabled).  When this
happens, kitty is mis-parsing the data and setting the title to ";".
2018-03-26 21:30:45 -04:00
Kovid Goyal
1fe936dbbc
Fix off by one when restoring cursor position after resize. Fixes #344 2018-02-25 09:15:48 +05:30
Kovid Goyal
0bda7b3679
When running kittens respect current screen scroll 2018-02-14 18:35:32 +05:30
Kovid Goyal
19648257f2
Have wcwidth() ignore SGR 2018-02-12 10:19:29 +05:30
Kovid Goyal
f4f0b8fd5f
Kittens learn about bracketed paste 2018-02-07 10:39:05 +05:30
Kovid Goyal
22cf67b407
More work on tui.loop 2018-02-06 20:08:28 +05:30
Kovid Goyal
fa87ce72a8
A terminal input parse helper for the kittens 2018-02-06 17:29:05 +05:30
Kovid Goyal
e830b7edf7
Add emoji presentation variation selector support to wcswidth() as well 2018-02-06 10:16:23 +05:30
Kovid Goyal
9c874f6685
Add support for the unicode emoji presentation variation selector 2018-02-06 09:52:55 +05:30
Kovid Goyal
b9857f9499
Only consider emoji characters with emoji presentation to have width two
Fixes #308
2018-02-05 09:21:13 +05:30
Kovid Goyal
240b1475c7
Fix regression that caused a few ligatures to not render correctly in rare circumstances
This was caused by cache corruption. is_special_glyph() and
is_empty_glyph() were treading over each other if called in
the right sequence. Fixes #303
2018-02-05 00:04:05 +05:30
Kovid Goyal
3f24e5b571
A few more places to remove wcwidth from 2018-02-04 22:47:02 +05:30
Kovid Goyal
fc7ec1d3f7
Get rid of the option to use the system wcwidth
The system wcwidth() is often wrong. Not to mention that if you SSH into
a different machine, then you have a potentially different wcwidth. The
only sane way to deal with this is to use the unicode standard.
2018-02-04 21:02:30 +05:30
Kovid Goyal
6736fd3835
Get rid of the query escape code for styled underlines 2018-02-04 16:40:48 +05:30
Kovid Goyal
647b95631f
Add tests for layout operations with an overlay window 2018-02-04 11:28:13 +05:30
Kovid Goyal
aa518b2520
Add tests for basic layout operations 2018-02-04 11:28:13 +05:30
Kovid Goyal
2ee9844c2b
Track cursor position explicitly during rewrap
Instead of using heuristics to position the cursor after a resize, track
the position during re-wrapping and place the cursor at the re-wrapped
position. Fixes #242 (I hope)
2018-02-02 13:06:18 +05:30
Kovid Goyal
9b0ffdbf5a
A spot of refactoring 2018-02-02 11:19:42 +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
73fe3293be
Fix copying from selection being restricted to only the visible part of the selection. Fixes #287 2018-01-17 21:39:24 +05:30
Kovid Goyal
1ae7ae4a1d
Fix consecutive separate ligatures being rendered in the same group
Rendering multiple ligatures in the smae group is bad for performance
and also causes incorrect rendering if the last ligature in the group
does not fit into the number of cells in the group.
2018-01-14 11:18:44 +05:30
Kovid Goyal
ce230b071b
Add tests for SGR protocol encoding 2018-01-07 23:48:16 +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
d48b76508b
Implement DECCARA
Ability to set text attributes/colors in arbitrary screen regions,
instead of working via the cursor. Note that kitty extends the original
DECCARA spec from the VT-510 to allow setting all supported SGR
attributes.
2017-12-17 18:03:39 +05:30
Kovid Goyal
684a2e05f4
Move logical DPI calculation into glfw module
Now DPI state is maintained in only one central place.
2017-12-14 18:30:53 +05:30
Kovid Goyal
898395253b
Add test for ignored color id in SGR colon based color sequence 2017-12-12 18:50:37 +05:30
Kovid Goyal
c95418a947
Remove unused code 2017-12-05 20:21:13 +05:30
Kovid Goyal
b191727567
Some simple tests for sc81t 2017-12-05 20:21:12 +05:30
Kovid Goyal
c17c6cae4c
Support S8C1T mode
That is, eight bit control codes. When in S8C1T mode, kitty will send
only eight bit control codes to the client.
2017-12-05 20:21:12 +05:30
Kovid Goyal
f2d00589d8
Update test to match new set of pre-rendered sprites 2017-12-04 12:41:50 +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
52ecdfe3a9
Fix incorrect termcap query responses
Did not realize that the responses had to be processed via tparm() i.e.
they should be the actual bytes not the textual representation of them.
This broke the backspace key in vim.
2017-12-03 21:34:55 +05:30
Kovid Goyal
b9798c74d4
Support for DCS status and capabilities reporting codes 2017-12-02 14:35:06 +05:30
Kovid Goyal
73b501c961
Make color parsing a little more robust
Add a few tests for it
2017-12-01 20:02:47 +05:30
Kovid Goyal
eb8f4e0b3c
isosx -> is_macos 2017-12-01 12:16:13 +05:30
Kovid Goyal
2b87e1f601
Fix #170 2017-11-13 19:47:54 +05:30
Kovid Goyal
26e6716f67
A test that reliably triggers the current failure 2017-11-13 15:30:30 +05:30
Kovid Goyal
9fccc38382
Better fix for not using the unsafe to break flag
Recognize special glyphs by comparing the index to the glyph for the
codepoint in the font. Cannot rely on glyph width as many glyphs have
zero width. For example the glyph for space characters.
2017-11-13 07:03:58 +05:30
Kovid Goyal
5c6be7f637
Insulate emoji test from system wcwidth 2017-11-12 23:43:21 +05:30
Kovid Goyal
088087df73
Use only cluster numbers and glyph sizes for grouping glyphs into cells
See https://github.com/behdad/harfbuzz/issues/615 for discussion
2017-11-12 23:43:21 +05:30
Kovid Goyal
5f4e003bed
Add a ligature shaping test 2017-11-11 20:55:53 +05:30
Kovid Goyal
53e9f35c1f
Add test for harfbuzz shaping 2017-11-11 18:47:34 +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
b58e900806
Call prerender() in rendering tests setup 2017-11-10 08:30:35 +05:30