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
Kovid Goyal
6c838bbc28
Implement dirty line tracking
2017-11-09 16:55:45 +05:30
Kovid Goyal
758d315b8e
Better fix for test
2017-11-09 16:55:45 +05:30
Kovid Goyal
dc7d705c87
Runa simplified version of the font rendering test on macOS
2017-11-09 16:55:45 +05:30
Kovid Goyal
a8bca1c119
Skip the rendering test on macOS
...
macOS is underpowered junk.
2017-11-09 16:55:44 +05:30
Kovid Goyal
da8bf5adc7
Add rendering tests
2017-11-09 16:55:44 +05:30
Kovid Goyal
898e87aa7b
Dont allocate space for dummy fonts
...
Also move sprite_map test into fonts test module
2017-11-09 16:55:42 +05:30
Kovid Goyal
d153794c05
...
2017-11-09 16:55:42 +05:30
Kovid Goyal
81143e0c7e
Test to render all box drawing characters under the sanitizers
2017-11-09 16:55:42 +05:30
Kovid Goyal
5a044c0320
...
2017-11-09 16:55:41 +05:30
Kovid Goyal
0518cabef6
Infrastructure for rendering cells in the test suite
2017-11-09 16:55:41 +05:30
Kovid Goyal
f25d2ea540
Rip out the old sprite update code
2017-11-09 16:45:45 +05:30
Kovid Goyal
a614fe615f
Improve error reporting of incomplete SGR codes
2017-11-05 10:17:40 +05:30
Kovid Goyal
3cb74a25ba
Fix handling of empty SGR code
...
Was broken by refactoring to support colons in SGR codes
2017-11-05 10:06:33 +05:30
Kovid Goyal
e90aaa8470
Add support for colons in SGR codes
2017-11-05 08:47:21 +05:30
Kovid Goyal
2443d76ac3
Apparently pep8 now just does not let you use the name l
...
This is one of the most hilarious bugs in pep8 I have come across
2017-10-23 17:40:53 +05:30
Kovid Goyal
8b54df31ef
Fix new pep8 ambiguous name warning
2017-10-23 17:33:57 +05:30
Kovid Goyal
40722f42d3
...
2017-10-17 10:18:03 +05:30
Kovid Goyal
192b16e9ff
Add Lenna to the test dir so the gr.py script becomes self-sufficient
2017-10-17 10:15:38 +05:30
Kovid Goyal
55db07c79f
Only display Lenna if she exists in the gr script
2017-10-16 18:52:17 +05:30
Kovid Goyal
75e84a4519
Let the gr.pt script run with python2 as well
2017-10-16 18:50:57 +05:30
Kovid Goyal
747f7b076d
Implement control code for deleting images
2017-10-08 22:51:00 +05:30
Kovid Goyal
d5088a3e5b
Do image clipping using OpenGL rather than on the CPU
2017-10-07 10:08:26 +05:30
Kovid Goyal
6a65f23f98
Add a a=q
mode for querying without storing image data
2017-10-06 23:43:42 +05:30
Kovid Goyal
135358423c
Remove use of random data in the tests
2017-10-06 22:52:50 +05:30
Kovid Goyal
31173245f8
Send ACKs to client when displaying images by id
2017-10-06 22:39:17 +05:30
Kovid Goyal
ad5a276ddb
Fix test broken by clipping of images to screen area
2017-10-06 22:34:21 +05:30
Kovid Goyal
a9d31541c1
Implement clipped scrolling of images when in page area mode
2017-10-06 21:08:10 +05:30
Kovid Goyal
600bff73d6
Off-by-one for image visibility testing
...
Also delete all images that overlap the screen on reset
2017-10-05 22:54:52 +05:30
Kovid Goyal
259e01e879
Add test for deleting images after they scroll off
2017-10-05 21:14:56 +05:30
Kovid Goyal
240c9b5d8b
A spot of refactoring
2017-10-05 20:54:45 +05:30
Kovid Goyal
664975b707
Show off kitty's graphics capabilities
2017-10-05 16:49:34 +05:30
Kovid Goyal
c3ab6ff780
Fix vertically inverted rendering of PNG
2017-10-04 23:38:36 +05:30
Kovid Goyal
46bb482e96
Fix y-axis mapping incorrect for images
2017-10-04 19:34:34 +05:30
Kovid Goyal
1a8d9314fe
Fix transmission of chunked compressed data
2017-10-04 10:19:25 +05:30
Kovid Goyal
c87dcdbe3c
Tests for displaying graphics
2017-10-03 16:10:04 +05:30
Kovid Goyal
3cbc20005b
Implement sending of image data to GPU
2017-10-01 09:04:46 +05:30
Kovid Goyal
28ae99ed37
More work on displaying images
2017-09-30 14:46:17 +05:30
Kovid Goyal
4f98d10caa
Remove the requirement to specify sizes for PNG files
2017-09-30 13:51:52 +05:30
Kovid Goyal
933621b038
Better libpng error handling
2017-09-30 13:51:51 +05:30
Kovid Goyal
c31e608ff9
Tests for loading PNG images
2017-09-30 13:51:51 +05:30
Kovid Goyal
c01f009e42
Remove sz requirement and implement proper fix for failure to mmap shm objects on OS X. Apparently they have to be mapped shared.
2017-09-30 13:51:51 +05:30
Kovid Goyal
dbd7ec5b27
Allow specifying the offset and size for reading data from files
...
Also require size to be specified for SHM objects to support platforms
such as macOS that have no way to get the size from the fd.
2017-09-30 13:51:51 +05:30
Kovid Goyal
b644d4620a
OS X does not support write() with shared memory
2017-09-30 13:51:51 +05:30
Kovid Goyal
03dd6e0490
Test for image loading from shared memory
2017-09-30 13:51:50 +05:30
Kovid Goyal
dfca991173
Test for loading image data from file
2017-09-30 13:51:50 +05:30
Kovid Goyal
8e5c4b6f7a
Require data size to be sent for PNG format
2017-09-30 13:51:50 +05:30
Kovid Goyal
d0d769f26b
Test for zlib de-compression
2017-09-30 13:51:50 +05:30
Kovid Goyal
35acb1497a
Fix chunked loading of images
2017-09-30 13:51:50 +05:30
Kovid Goyal
8cd1f76d2b
Framework for testing loading of images
2017-09-30 13:51:50 +05:30
Kovid Goyal
f0ee728b94
Fix failing flake
2017-09-30 13:51:50 +05:30
Kovid Goyal
7da08d37d2
File to host graphics tests
2017-09-30 13:51:49 +05:30
Kovid Goyal
23c2bdb6f0
Dont silently wrap too large ids, instead ignore the graphics command
2017-09-30 13:51:49 +05:30
Kovid Goyal
7736629bc4
Fix graphics id not going upto UINT32_MAX
2017-09-30 13:51:49 +05:30
Kovid Goyal
204bd97198
Nicer error responses on bad graphics data
2017-09-30 13:51:49 +05:30
Kovid Goyal
66bce4b8cd
Code to read image data
2017-09-30 13:51:48 +05:30
Kovid Goyal
c567acb4e5
Work on loading images
2017-09-30 13:51:48 +05:30
Kovid Goyal
15e03f74f4
Also report the payload for graphics commands
2017-09-30 13:51:47 +05:30
Kovid Goyal
56c2e0c26a
Report incomplete graphics commands as parser errors
2017-09-30 13:51:47 +05:30
Kovid Goyal
83de392b39
...
2017-09-30 13:51:47 +05:30
Kovid Goyal
3c89f80603
More tests for the graphics control code parser
2017-09-30 13:51:47 +05:30
Kovid Goyal
8e64895c23
Framework for testing graphics command parsing
2017-09-30 13:51:47 +05:30
Kovid Goyal
b8d9629ee4
Start work on parsing of graphics escape code
2017-09-30 13:51:46 +05:30
Kovid Goyal
5b24d51fcd
Fix failing screen resize test
...
Take into account the index that now happens to ensure that
the cursor is on a new line.
2017-09-30 13:51:35 +05:30
Kovid Goyal
3ca45ab241
Fix cursor moving one line up when resizing
2017-09-20 10:59:31 +05:30
Kovid Goyal
bc1de92534
Fix the broken tests
2017-09-16 17:05:58 +05:30
Kovid Goyal
9cd146fe3e
Remove the buf_toggled callback
2017-09-16 16:31:29 +05:30
Kovid Goyal
c5e989bc94
Move the key handler to C
2017-09-15 21:46:00 +05:30
Kovid Goyal
464291bbb1
Port click on URL code to C
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
c683725434
Get rid of the timers infrastructure
...
It is not needed with a pure state machine.
Note that drag scrolling still has to be ported from using
timers.
2017-09-15 10:45:24 +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
029ff84f09
Remove the change tracker related tests
...
The change tracker no longer exists
2017-09-15 10:45:16 +05:30
Kovid Goyal
6127d2d122
Make the sprite map globally accessible from C code as well as python code
...
The lock was removed as the Python GIL is sufficient to serialize access
to the SpriteMap structure.
2017-09-15 10:45:10 +05:30
Kovid Goyal
a429bcbb22
Dont use the glfw timer function as it requires glfwInit
2017-09-15 10:45:07 +05:30
Kovid Goyal
08f336769f
Add tests for key mapping
...
Also fix Alt+Special keys no generating correct codes
2017-05-20 11:41:21 +05:30
Kovid Goyal
cd1ba334c1
Forgot to change test
2017-05-19 15:54:34 +05:30
Kovid Goyal
3f272d102b
Test for toggling IUTF8
2017-04-28 09:41:47 +05:30
Kovid Goyal
898a8075be
Fix #69
2017-04-28 08:31:07 +05:30
Kovid Goyal
01c289e440
Add ST test to OTH tests as well
2017-04-05 09:09:41 +05:30
Kovid Goyal
db2d14d9ed
Fix backslashes in OSC codes not being parsed correctly
...
Fixes #61
2017-04-05 09:07:55 +05:30
Kovid Goyal
edab1aebaa
Allow clients to query if the terminal emulator support styled underlines
2017-02-10 16:00:51 +05:30
Kovid Goyal
585a01fff6
Start out in normal key mode
...
Matches behavior of xterm
2017-02-05 16:39:40 +05:30
Kovid Goyal
bb7edb5f8f
Implement DECRQM
...
Also add tests for DECRQM and DECCKM
2017-02-05 16:21:13 +05:30
Kovid Goyal
cc14562f2c
Forgot the unicode version of APC and PM
2017-01-20 13:40:58 +05:30
Kovid Goyal
0612855c95
Ignore PM and APC control codes
2017-01-20 13:31:05 +05:30
Kovid Goyal
9c501b37ea
Allow skipping of tests that depend on a modern wcwidth() via an env var
2017-01-10 13:52:15 +05:30
Kovid Goyal
2517e4a8a0
Expand the wcwidth test
2017-01-09 07:13:14 +05:30
Kovid Goyal
af8d44ecab
Refactor screen mode API to use get/setters
2017-01-04 10:24:00 +05:30
Kovid Goyal
b4af2ff314
The cursor visible (DECTCEM) property should be global, not affected by save/restore of cursor or alternate screens
2017-01-04 10:02:39 +05:30
Kovid Goyal
3c9d4dfb90
Fix designate_charset without change_charset not taking effect
2016-12-13 12:43:20 +05:30
Kovid Goyal
0797f159ad
Only move the cursor a line down on resize if the cursor line was split
2016-12-12 12:44:33 +05:30
Kovid Goyal
271e3360ff
Fix top lines appearing at bottom when resizing a screen that seen more lines than the number of lines available
2016-12-12 10:58:18 +05:30
Kovid Goyal
b6c639c487
Fix incorrect handling of trailing whitespace for lines in the history buffer when resizing
2016-12-11 14:48:00 +05:30
Kovid Goyal
ae3f555f51
HistoryBuf.as_ansi()
2016-12-09 19:39:20 +05:30
Kovid Goyal
471b36832e
...
2016-12-09 12:46:02 +05:30
Kovid Goyal
5a6ecbbf43
LineBuf.as_ansi()
2016-12-09 12:44:39 +05:30
Kovid Goyal
e3e3e86598
Code to get the ANSI representation of a line
2016-12-08 21:11:12 +05:30
Kovid Goyal
489504cda5
More charset fixes
...
Properly use the G0/G1 charsets only to map characters being drawn to
the screen. And only decode bytes using either Latin-1 or UTF-8,
defaulting to UTF-8 at startup/reset.
2016-11-30 23:36:10 +05:30
Kovid Goyal
b343625b9f
Add a simple test for SGR
2016-11-30 21:16:04 +05:30
Kovid Goyal
ce1514963b
Various charset related fixes
...
Fix changing of charset not taking effect immediately while parsing a
single block of bytes
Fix incorrect mapping of C0 control codes in some of the charsets
2016-11-30 19:44:41 +05:30
Kovid Goyal
c713712f89
Restore support for charsets other than UTF-8
2016-11-30 17:48:52 +05:30
Kovid Goyal
45a5190a0d
Handle CSI codes that start with a ;
2016-11-30 16:03:45 +05:30
Kovid Goyal
a095fffc67
Finish up the margins test
2016-11-30 15:12:00 +05:30
Kovid Goyal
2b39b3a053
Change tests now that we dont report ch number for simple commands
2016-11-30 15:06:17 +05:30