Commit Graph

1038 Commits

Author SHA1 Message Date
Kovid Goyal
1c558be524
Port HISTFILE fix to ssh bash launcher 2022-03-03 21:24:45 +05:30
Kovid Goyal
7d653cb7bf
Allow copying the same file to multiple locations 2022-03-03 21:24:45 +05:30
Kovid Goyal
b4cc38a1d9
Fix symlink extraction over ssh 2022-03-03 21:24:45 +05:30
Kovid Goyal
8867317b6a
Allow transferring files outside of HOME 2022-03-03 21:24:45 +05:30
Kovid Goyal
e06bd68379
Split up ssh tests 2022-03-03 21:24:45 +05:30
Kovid Goyal
ae6665493a
Implement setting of env vars 2022-03-03 21:24:44 +05:30
Kovid Goyal
53c8485a7a
Get env conf working with tests 2022-03-03 21:24:44 +05:30
Kovid Goyal
02a68e7541
Pass the value of shell_integration in the tarfile
Allows per host overrides and also avoids needing to read kitty.conf in
the ssh kitten
2022-03-03 21:24:44 +05:30
Kovid Goyal
6e5dbc5285
Test for handling of leading data 2022-03-03 21:24:44 +05:30
Kovid Goyal
e1f5ef59c8
Remove integration tests with login_shell=''since that is tested explicitly before 2022-03-03 21:24:44 +05:30
Kovid Goyal
44baeb6924
Run login_shell detection tests with all available shells 2022-03-03 21:24:44 +05:30
Kovid Goyal
c00e8b1709
Add tests for the individual login_shell detection functions 2022-03-03 21:24:44 +05:30
Kovid Goyal
55ede897b9
faster fail 2022-03-03 21:24:43 +05:30
Kovid Goyal
a71e7d7eb1
Simplify data transmission 2022-03-03 21:24:43 +05:30
Kovid Goyal
22c1ee7dc8
Cannot call the parser from callbacks that are themselves called from the parser 2022-03-03 21:24:43 +05:30
Kovid Goyal
d452a5cdce
... 2022-03-03 21:24:43 +05:30
Kovid Goyal
78b553e55e
Add tests for turning off shell integration in the bootstrap script 2022-03-03 21:24:43 +05:30
Kovid Goyal
8ca3a511cc
Get the ssh bootstrap tests fully working 2022-03-03 21:24:43 +05:30
Kovid Goyal
bf26a3f569
Skip bash if its too old when testing bootstrap script 2022-03-03 21:24:43 +05:30
Kovid Goyal
ddb8753548
Work on enabling shell integration over ssh 2022-03-03 21:24:43 +05:30
Kovid Goyal
e73525d0a2
Start work on testing the bootstrap script 2022-03-03 21:24:43 +05:30
Kovid Goyal
4279f20daf
Dont depend on the default bash prompt when testing 2022-03-03 21:24:42 +05:30
Kovid Goyal
2dd7c3b939
More work on ssh bootstrap 2022-03-03 21:24:42 +05:30
Kovid Goyal
d8ed42ae8e
Move setting of ZLE_RPROMPT_INDENT to zshrc which will hopefully prevent it being overriden 2022-03-03 19:16:44 +05:30
Kovid Goyal
297592242c
Fix #4782
Presumably the failure is caused by zsh not having finished drawing the
prompt when the cursor shape is changed. So instead wait till the
expected prompt is drawn. There are probably more places where this
change needs to be made, which I cant tell since I cant reproduce.
2022-03-03 17:22:42 +05:30
Kovid Goyal
e103b280fd
Add test for HISTFILE 2022-02-28 20:09:54 +05:30
pagedown
2d4f7e3446
Disable system startup files in zsh integration test with --noglobalrcs 2022-02-27 20:21:05 +08:00
Kovid Goyal
165c1240a9
Make the test a little more robust 2022-02-27 11:04:12 +05:30
Kovid Goyal
f91463a494
Also add test for handling of control chars in zsh title reporting 2022-02-27 10:47:23 +05:30
Kovid Goyal
d53f8f24c4
Fix #4757
Still have to do the fix for zsh/fish
2022-02-27 10:20:19 +05:30
pagedown
e2f16ff624
Add fish pipestatus integration tests and changelog entries 2022-02-27 00:27:31 +08:00
Kovid Goyal
b212fd5bcd
Dont actually need a thread for PTY 2022-02-24 10:05:13 +05:30
Kovid Goyal
0a297f4656
proper ordering during shutdown 2022-02-24 00:27:09 +05:30
Kovid Goyal
fa397a1d24
PTY: Write to child in separate thread 2022-02-24 00:26:08 +05:30
Kovid Goyal
0610daaec7
Remove echo dance 2022-02-24 00:08:17 +05:30
Kovid Goyal
8278e2b88d
Dont fail test in no PATH in environ 2022-02-23 23:27:24 +05:30
Kovid Goyal
cb4a9d89cf
Cleanup linenum matching and add some tests 2022-02-23 23:06:19 +05:30
Kovid Goyal
12e011c481
Merge branch 'test-ksi-fish' of https://github.com/page-down/kitty 2022-02-23 18:31:13 +05:30
Kovid Goyal
668783ba1c
Use a version check when skipping bash test 2022-02-23 18:27:20 +05:30
pagedown
c18ebef702
... 2022-02-23 20:49:32 +08:00
Kovid Goyal
03f9f29ce4
DRYer 2022-02-23 18:14:40 +05:30
pagedown
9c05481f14
... 2022-02-23 20:05:30 +08:00
pagedown
c0f6201ac3
Add fish shell integration tests 2022-02-23 19:55:19 +08:00
Kovid Goyal
fc9645832d
Add tests for --noprofile, --rcfile, --norc as well 2022-02-23 10:42:25 +05:30
Kovid Goyal
c47f41cfc0
Add tests for bash startup file sourcing 2022-02-23 08:35:24 +05:30
Kovid Goyal
e28aae620a
Add tests for reset of cursor shape when running commands 2022-02-23 07:48:42 +05:30
Kovid Goyal
88091b4ab3
BASH integration: No longer modify .bashrc to load shell integration
I think I have things setup robustly so that the shell integration
is loaded transparently via env vars and the normal bash startup files
are sourced, in the same way that vanilla bash does it. Let's hope I
haven't overlooked something.
2022-02-22 21:24:51 +05:30
Kovid Goyal
4487462b0d
bash assumes ECHO is enabled for the tty 2022-02-22 20:43:58 +05:30
Kovid Goyal
dac9b07f16
bash shell integration: Handle both literal and escaped newlines in PS1 2022-02-22 18:30:20 +05:30
Kovid Goyal
b59212696a
Skip testing bash on macOS as it is too old 2022-02-22 14:53:46 +05:30
Kovid Goyal
7fe1376e34
DRYer 2022-02-22 14:52:54 +05:30
Kovid Goyal
e25b90c1b6
Add bash integration tests 2022-02-22 12:23:19 +05:30
Kovid Goyal
cb32a0b8fc
Handle remote print callback in tests 2022-02-22 11:47:44 +05:30
Kovid Goyal
65c7ecbc30
Test prompt drawing after screen is shrunk 2022-02-21 21:17:52 +05:30
Kovid Goyal
da5e37620e
Also test changing of title when running command 2022-02-21 21:17:52 +05:30
Kovid Goyal
261057396c
Fix zsh integration test on CI
Also, add various other robustness improvements to the test
2022-02-21 21:17:41 +05:30
Kovid Goyal
a43f610555
Better error msg when cursor is not changed 2022-02-21 18:23:35 +05:30
Kovid Goyal
45ae52e5d0
Fix assert ordering 2022-02-21 18:07:54 +05:30
Kovid Goyal
a565443d4a
Saner tempdir removal 2022-02-21 18:05:36 +05:30
Kovid Goyal
081d6a3f16
Install various shells ON CI so we can test with them 2022-02-21 18:00:23 +05:30
Kovid Goyal
c9cc832875
Add basic tests for zsh shell integration 2022-02-21 17:57:25 +05:30
Kovid Goyal
b28d94ac97
Always use kitty as the python interpreter to run in the tests 2022-02-21 14:45:12 +05:30
Kovid Goyal
b9684879e7
Try to fix tests failing on CI 2022-02-21 14:24:08 +05:30
Kovid Goyal
63f974531b
Framework for testing with external programs via a PTY 2022-02-21 14:08:10 +05:30
Kovid Goyal
711f8b024e
Properly sanitize pagerhist when returning as plain text 2022-02-15 22:11:57 +05:30
Kovid Goyal
80202d2679
Fix show_last_command_output not working when the output is stored partially in the scrollback pager history buffer
Fixes #4435
2022-02-15 13:04:02 +05:30
Kovid Goyal
5d120a2f36
Output prompt marking when serializing to ANSI 2022-02-15 08:57:17 +05:30
Kovid Goyal
1170cf474f
A new action copy_ansi_to_clipboard to copy the current selection with ANSI formatting codes
Fixes #4665
2022-02-10 12:20:19 +05:30
Kovid Goyal
b5a2f94185
The open_actions() test needs options set 2022-01-24 15:21:32 +05:30
Kovid Goyal
17a3be8cb1
Merge branch 'dotted-dashed-underline' of https://github.com/jcla1/kitty 2022-01-18 21:03:30 +05:30
Joseph Adams
da486153de Add (possibly erroneous) test for new underline.
Also make more clear *what* exactly is rendered in the cell (i.e. a
strikethrough).
2022-01-18 12:52:59 +01:00
Joseph Adams
dd192ad0b7 Make old tests run
Previously, because of the new underline styles a couple of tests were
failing due to an unexpected number of sprites being returned from the
test-set-up. No new tests were added.
2022-01-18 12:28:24 +01:00
pagedown
ce6f99044e
... 2022-01-16 04:14:59 +08:00
pagedown
30b81d98f1
Add tests for finding command output 2022-01-16 04:10:16 +08:00
Kovid Goyal
362c4147e4
... 2022-01-08 12:21:55 +05:30
Kovid Goyal
1454af2d41
macOS: Allow customizing the launch actions 2022-01-07 18:43:07 +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
e45697f78a
Fix a regression that broke rendering of unicode regional indicators
At some point, unicode regional indicators became combining chars in the
unicode standard, which broke the handling of them in draw_codepoint().
The fix has the added advantage of improving performance in the common
case by only checking for combining chars. The flag check happens only
if the first check matches.

Fixes #4407
2021-12-31 09:28:47 +05:30
Kovid Goyal
8699f90fa4
Now have sphinx types on dev machine 2021-12-23 10:13:16 +05:30
Kovid Goyal
62dbc1129c
When setting the OS Window title strip out CSI escape codes
Fixes #4325
2021-12-08 16:04:23 +05:30
Kovid Goyal
0c274a9a0b
Parse actions on demand
This removes the startup cost of parsing hundreds of default actions
when action_alias or kitten_alias are used. Although the cost is on the
order of 1ms, this design feels cleaner and gives nicer debug config
output.
2021-11-29 21:51:42 +05:30
Kovid Goyal
16b4a4fa80
Forgot to change test for new zsh shell integration code 2021-11-27 07:49:32 +05:30
Kovid Goyal
2ca13e886a
Avoid cyclic infinite recursion
Note that this means that any alias is only expanded once per action
2021-11-23 15:36:58 +05:30
Kovid Goyal
a97a05b1ec
Allow action_alias to work with any action 2021-11-23 14:43:36 +05:30
Kovid Goyal
ee2520e036
Also prevent infinite recursion in kitten_alias 2021-11-23 07:53:40 +05:30
Kovid Goyal
d7f569b341
Add a test for recursion 2021-11-22 22:54:21 +05:30
Kovid Goyal
89069407d2
Make action_alias recursive 2021-11-22 22:15:04 +05:30
Kovid Goyal
ec5165d958
Fix action_alias not working when used with arguments 2021-11-22 21:41:55 +05:30
Kovid Goyal
aa4fa4cc85
Allow defining aliases for more general actions, not just kittens
Fixes #4260
2021-11-22 19:52:43 +05:30
Kovid Goyal
81467c2e7e
... 2021-11-20 07:36:52 +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
6afaec1d62
Use a single function for getting command output 2021-11-15 15:17:34 +05:30
pagedown
f3dd2a8bfd
Get the first command output on screen and the last scrolled one 2021-11-15 15:17:33 +05:30
Kovid Goyal
c43637f6cc
Dont copy prompt start bits to multiple lines when resizing the screen
This makes it unnecessary to modify the prompt marking protocol to
distinguish consecutive prompts without output in between
2021-11-07 18:00:06 +05:30
Kovid Goyal
950edb1110
Fix symlink transmission 2021-11-05 13:18:58 +05:30
Kovid Goyal
c4b3723372
More work on file transfer 2021-11-05 13:10:04 +05:30
Luflosi
bb5ded4e65
Don't rely on nanosecond resolution when testing mtime transmission
Commit 85cea78b3c missed a couple instances where the mtime was not a multiple of 1µs.
See https://github.com/kovidgoyal/kitty/issues/4175.
2021-11-01 21:06:23 +01:00
Kovid Goyal
85cea78b3c
Use 13000 when testing mtime transmission as there exist some systems with a 1000ns resolution. See #4175 2021-10-31 19:13:55 +05:30
Luflosi
e82e57a30c
Remove unused code
Since 99d9cb0b0d runs all tests with HOME set to a temporary directory, this code setting the cache directory to a temporary directory is no longer needed. `cache_dir()` will choose a directory in the home directory if neither KITTY_CACHE_DIRECTORY or XDG_CACHE_HOME are set.
2021-10-31 11:42:55 +01:00
Kovid Goyal
d03f4dbc98
More work on file transfer 2021-10-30 16:54:27 +05:30
Kovid Goyal
ee852cf5fc
More work on file transmission 2021-10-29 21:52:49 +05:30
Kovid Goyal
820a893d75
More work on file transfer 2021-10-29 15:01:31 +05:30
Kovid Goyal
2443dc135c
Use a faster implementation of the Color type
Now implemented in C
2021-10-28 11:15:13 +05:30
Kovid Goyal
b51be8382f
Transmit home directory when sending so filenames can be resolved
Also only send metadata if permission granted by user
2021-10-21 20:06:53 +05:30
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
8f0b3983ee
Apparently only importlib_resources has actually deprecated contents() 2021-10-20 11:15:51 +05:30
Kovid Goyal
7f2ce045ab
Handle deprecation of importlib.resources APIs 2021-10-19 09:14:58 +05:30
Kovid Goyal
5f91084968
More work on file transfer 2021-10-18 13:02:37 +05:30
Kovid Goyal
706494016c
More work on file transmission 2021-10-14 18:29:02 +05:30
Kovid Goyal
563b7ad2d0
Linux binary builds: Fix Pygments not being included 2021-10-11 20:00:56 +05:30
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
498d3d5906
More cleanups 2021-10-05 11:58:06 +05:30
Kovid Goyal
57152a8e29
Fix utmp test 2021-10-05 11:41:18 +05:30
Matt Fellenz
1d4a86594b
Add tests for UTMP methods 2021-10-04 20:49:48 -07:00
Kovid Goyal
df1ecad7e9
Fix failing test
Ignore progress messages in the tests
2021-10-03 12:01:41 +05:30
Kovid Goyal
01299421ee
Fix typo causing test to fail 2021-10-02 11:07:34 +05:30
Kovid Goyal
5729e33412
librsync actually blocks on output buffer size as well as input availability. So handle that 2021-10-02 09:26:35 +05:30
Kovid Goyal
e6cff61f99
Move management of destination file completely into PatchFile 2021-10-01 14:29:14 +05:30
Kovid Goyal
7d41aca0e4
More word selection direction change fixes 2021-09-27 20:42:22 +05:30
Kovid Goyal
c71d8fe1cc
Fix #4070 2021-09-27 17:29:22 +05:30
Kovid Goyal
3bc7b5bad9
Remote file transfer: Fix transfer not working is custom ssh port or identity is specified on the SSH command line
Fixes #4067
2021-09-27 10:58:40 +05:30
Kovid Goyal
259ca4a11e
Speed up parsing of file transfer OSC codes
Avoid roundtrips between unicode and bytes objects
2021-09-25 14:05:21 +05:30
Kovid Goyal
17e95cb615
Add a test for rsync roundtrip 2021-09-19 20:55:00 +05:30
Kovid Goyal
b5c086aedb
... 2021-09-19 20:25:08 +05:30
Kovid Goyal
f0fab80f5b
Start work on rsync support for file transfers 2021-09-17 13:41:45 +05:30
Kovid Goyal
5ce71506c8
Various minor fixes in nightly pipeline 2021-09-16 22:31:43 +05:30
Kovid Goyal
d042ea5ab9
Split up tranfer kitten code into modules 2021-09-16 13:47:12 +05:30
Kovid Goyal
5f32d2e56f
Uppercase DELETE_ENV_VAR 2021-09-16 10:16:33 +05:30
Kovid Goyal
5b716df45f
We dont need a special class for delete_env_var 2021-09-16 09:53:54 +05:30
Kovid Goyal
66e2e60ac4
Allow deleting environment vars from the child environment using env 2021-09-16 08:43:17 +05:30
Kovid Goyal
6993c905e3
Disallow empty ids in file transfer commands 2021-09-13 09:53:59 +05:30
Kovid Goyal
31ead3f088
Basic file transfer works for sending 2021-09-12 10:02:23 +05:30
Kovid Goyal
9db9638bc3
Soak up protocol responses after a cancel to avoid outputting garbage to the shell after the kitten exits 2021-09-11 10:48:40 +05:30
Kovid Goyal
f9c99a61d4
More work on file transfer 2021-09-09 12:59:31 +05:30
Kovid Goyal
745e97e0ab
Send a started response after each dest file is registered 2021-09-08 09:59:45 +05:30
Kovid Goyal
af5c0b3b71
More work on transmission kitten 2021-09-08 08:56:14 +05:30
Kovid Goyal
40786427b0
More work on file transmission 2021-09-01 09:22:04 +05:30
Kovid Goyal
161a54ceaa
Disable transmission tests pending rewrite 2021-08-30 08:08:41 +05:30
Kovid Goyal
075b4d252a
DRYer 2021-08-24 07:49:12 +05:30
Kovid Goyal
1953ecdf4d
Add tests for container transmission 2021-08-23 22:10:26 +05:30
Kovid Goyal
d9cc1d67c0
Make path comparison more robust 2021-08-23 11:48:21 +05:30
Kovid Goyal
d178f4c75d
Implement canceling of file transmission 2021-08-23 11:33:03 +05:30
Kovid Goyal
0668a3bf2a
Send a response indicating transmission was successful 2021-08-23 11:09:45 +05:30
Kovid Goyal
d548b21be2
Allow interleaving file transmissions 2021-08-22 22:08:03 +05:30
Kovid Goyal
780e526143
Use a union for cell attributes
Cleaner code, no performance impact
2021-08-18 10:06:08 +05:30
Kovid Goyal
bffe7aba8f
Add shell integration scripts to kitty package 2021-08-18 10:06:05 +05:30
Kovid Goyal
07b971ad5f
Add a shortcut to easily browse the output of the last command run in the shell 2021-08-18 10:06:04 +05:30
Kovid Goyal
bd5f100f13
Add test for multiline prompt jumping 2021-08-18 10:06:04 +05:30
Kovid Goyal
3b8da7e4c2
implementation of scroll_to_prompt 2021-08-18 10:06:04 +05:30
Kovid Goyal
f0e7344bc8
Use bundled CA certs on Linux binary builds as well
Makes it consistent with macOS
2021-08-16 22:47:53 +05:30
Kovid Goyal
aa525c68c7
Only test bundled CA certs on macOS 2021-08-16 22:26:10 +05:30
Kovid Goyal
5966f04656
Add a build test for CA certificate loading 2021-08-16 20:44:47 +05:30
Kovid Goyal
dbc7e8e85d
When dragging word or line selections, ensure the initially selected item is never deselected
This matches behavior in most other programs
Fixes #3930
2021-08-13 20:23:43 +05:30
Kovid Goyal
e1ed9aca10
clear_all_mouse_shortcuts -> clear_all_mouse_actions 2021-08-07 21:34:16 +05:30
bdeshi
db5a2d2141
add clear_all_mouse_shortcuts option to clear mouse_maps 2021-08-07 21:33:56 +06:00
Kovid Goyal
ca1b2454bd
Fix position output in matcher 2021-08-07 10:45:50 +05:30
Kovid Goyal
d6a6cbe153
Migrate import in test 2021-08-05 07:05:19 +05:30
Kovid Goyal
419cf78984
A new remote control command to resize OS Windows 2021-07-25 22:57:00 +05:30
Kovid Goyal
8f214c51c0
Get rid of kitty's special OSC 52 protocol
A better solution from an ecosystem perspective is to just work with the
original protocol. I have modified kitty's escape parser to special case
OSC 52 handling without changing its max escape code size.

Basically, it works by splitting up OSC 52 escape codes longer than the
max size into a series of partial OSC 52 escape codes. These get
dispatched to the UI layer where it accumulates them upto the 8MB limit
and then sends to clipboard when the partial sequence ends.

See https://github.com/ranger/ranger/issues/1861
2021-07-23 22:18:02 +05:30
Kovid Goyal
340159b591
Graphics protocol: Support for frame composition
Fixes #3809
2021-07-22 18:58:59 +05:30
Kovid Goyal
1d9626d493
Graphics protocol: Fix image without placements being deleted when screen scrolls 2021-07-10 14:05:53 +05:30
Kovid Goyal
05d0bda044
Allow selecting blanks at the start of the top line 2021-07-04 18:49:17 +05:30
Kovid Goyal
e732df46b8
Have right clicking to extend selection operate on the nearest selection boundary instead of the selection end. This matches both vim and xterm 2021-07-04 18:00:41 +05:30
Kovid Goyal
1ef895e246
When dumping commands dump stop_pending_mode at the correct place 2021-07-03 12:07:46 +05:30
Kovid Goyal
38ae370202
Fix #3789 2021-07-03 10:12:44 +05:30
Kovid Goyal
026d200add
Fix a bug in the implementation of the synchronized updates escape code that could cause incorrect parsing if either the pending buffer capacity or the pending timeout were exceeded
Fixes #3779
2021-07-01 15:32:53 +05:30
Kovid Goyal
e6a17f78b6
Use the main VT parser in pending mode as well
Should get much closer semantics in the two cases and its nice not to
have an extra mini VT parser for pending mode. There is a performance
hit in pending mode, since now the pending mode bytes are round tripped
via utf-8 decoding/encoding, but its worth it for the code
simplification.
2021-06-30 10:52:22 +05:30
Kovid Goyal
5768c54c5b
Add support for pending mode via SM/RM 2026
Because, why the hell not, it's not like I have an actual life.
More seriously, terminal-wg (aka Bikeshedder's Anonymous) is
pushing for it so it's likely at least one poor application writer
will fall for their propaganda.
2021-06-29 12:24:34 +05:30
Kovid Goyal
81411e6b54
Fix trailing parentheses in URLs not being detected
Also fix URLs starting near the end of the line not being detected.

Fixes #3688
2021-06-04 18:13:36 +05:30
Kovid Goyal
e01bb09e8c
Fix ligatures not working with the Iosevka font
Fixes #297
2021-06-04 12:18:17 +05:30
Kovid Goyal
af5ed093b8
Fix test failing on macOS 2021-05-31 17:54:57 +05:30
Kovid Goyal
6d7df1c5e8
Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal
f7db9e3527
Move deprecated parsers into utils 2021-05-31 17:40:48 +05:30
Kovid Goyal
248631a1a8
Add tests for conf parsing 2021-05-31 17:40:48 +05:30
Kovid Goyal
4d0d0b205d
Improve parser error messages a bit 2021-05-17 21:29:54 +05:30
Kovid Goyal
6dcc09a96f
Port mouse selection tests to new framework 2021-05-11 11:49:44 +05:30
Kovid Goyal
efb0f6f24a
Fix a regression in 0.20.0 that sent incorrect bytes for the F1-F4 keys in rmkx mode
Fixes #3586
2021-05-07 15:09:42 +05:30
Kovid Goyal
33287115de
Support infinite length ligatures 2021-05-07 06:59:24 +05:30
Kovid Goyal
33de0f821f
Use uthash for the sprite position cache 2021-05-07 06:58:54 +05:30
Kovid Goyal
5cf228e362
Fix tab activity tracking not working unless there is some other activity in tab bar as well
Fixes #3571
2021-05-05 14:30:16 +05:30
Kovid Goyal
b32c346eed
A new protocol extension to unscroll the screen
See https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/30
2021-04-23 15:44:38 +05:30
Kovid Goyal
a7c5b8c634
Fix #3471 2021-04-13 09:53:57 +05:30
Kovid Goyal
76fca0641e
Fix memory leak in utf_8_strndup test 2021-04-10 13:39:04 +05:30
Kovid Goyal
82d11b80dd
Add a test for filling from scrollback with large continued line 2021-04-09 17:04:55 +05:30
Ravi R Kiran
fdfba4ea04 Fix pyflakes failures 2021-03-30 14:57:41 -05:00
Ravi R Kiran
953253de99 Implementation of hyper and meta 2021-03-30 14:23:17 -05:00
Kovid Goyal
d28caf15b2
More glyph grouping fixes 2021-03-25 14:06:16 +05:30
Kovid Goyal
7c7933efa9
Fix #3416 2021-03-24 13:17:38 +05:30
Kovid Goyal
11268ffa16
Fix marking of text not working on lines that contain zero cells
Zero cells are passed to the regex engine as spaces, so they must
increment the match_pos counter. Fixes #3403
2021-03-23 10:04:58 +05:30
Kovid Goyal
83bbcf0aa1
Graphics protocol: Add a control to allow clients to specify that the cursor should not move when displaying an image
Fixes #3411
2021-03-22 22:16:40 +05:30
Kovid Goyal
ccafdacc6f
Ensure cursor position is correct when filling line buffer 2021-03-18 10:39:08 +05:30
Kovid Goyal
0f3ff4e2d9
Scrollback filling should happen after cursor position is finalized 2021-03-17 21:59:11 +05:30
Kovid Goyal
071986138b
Cleanup previous merge 2021-03-17 13:43:26 +05:30
Eddie Lebow
b76491ba82
Add tests for scrollback_fill_enlarged_window 2021-03-15 23:58:11 -04:00
Kovid Goyal
9fdaef1da6
Graphics protocol: Fix suppression of responses not working for chunked transmission
Now the starting escape codes q value is used unless the last escape
code specifies a non-zero q value of its own. Fixes #3375
2021-03-10 09:58:49 +05:30
Kovid Goyal
56fcbb95ab
Key encoding: in legacy mode use legacy encoding for a few more combinations
Some legacy terminal applications get confused seeing CSI u escape
codes. Since it is relatively common to press ctrl or shift and
space/enter/tab/backspace, emit the same bytes as traditional terminals
do for these common keys.
2021-02-21 11:14:25 +05:30
Kovid Goyal
6a901ea048
Forgot that wayland is not built on CI 2021-02-19 18:09:12 +05:30
Kovid Goyal
dbc1ade5a9
Fallback to importlib_resources on python 3.6 2021-02-19 18:02:15 +05:30
Kovid Goyal
c2a924a5ea
Run all tests on the full frozen build using the frozen launcher
Much more comprehensive test coverage at the cost of slightly increasing
the frozen build size.
2021-02-19 17:57:59 +05:30
Kovid Goyal
e06d40cb31
Fix test suite getting type checked accidentally 2021-02-19 15:19:04 +05:30
Kovid Goyal
9cd8637e9c
Remove another use of __file__ 2021-02-19 14:49:07 +05:30
Kovid Goyal
38992e25d7
Make the tests into a package
Useful to make the tests runnable in a frozen build.
2021-02-19 14:35:25 +05:30
Kovid Goyal
625f0f77bb
Ensure disk cache is cleared 2021-02-19 09:43:57 +05:30
Kovid Goyal
0341b64748
Allow caching of disk cache entries in RAM 2021-02-18 10:22:42 +05:30
Kovid Goyal
ba005e991a
Improve handling of infinite length ligatures in newer versions of FiraCode and CascadiaCode.
Now such ligatures are detected based on glyph naming convention.
This removes the gap in the ligatures at cell boundaries. However, at
least in Fira Code the infinite length ligature glyphs define a negative
left side bearing. This means they overlap when drawn consecutively,
leading to unsightly bumps at the joins.

Fixes #2695
2021-02-15 15:49:09 +05:30
Kovid Goyal
912c46fc57
Fix rendering of ligatures in the latest release of Cascadia code
For some reason it puts empty glyphs after the ligature glyph rather than before it.
There is a possibility this fix might break something else, we will see.
Fixes #3313
2021-02-15 11:57:57 +05:30
Kovid Goyal
5675944c0c
Recognize remaining ASCII keys for legacy mode as well 2021-02-15 05:33:57 +05:30
Kovid Goyal
6b9c280214
Add a test for encoding of : as a legacy ascii key 2021-02-15 05:27:32 +05:30
Kovid Goyal
fe07306ff1
Use a nicer decorator for functions that only need to be run once 2021-02-05 10:40:52 +05:30
Kovid Goyal
4ba35d4a93
Clear cache_dir lru cache when testing 2021-02-05 09:56:17 +05:30
Kovid Goyal
67ca1902a0
Use a cache dir in the cwd on CI 2021-02-05 09:42:01 +05:30
Kovid Goyal
1ef326e220
Better error message 2021-02-05 09:29:56 +05:30
Kovid Goyal
7a1785e1e8
Get chunked loading working with frames 2021-02-04 21:04:44 +05:30
Kovid Goyal
19f0e2303d
Refactor to store frame deltas instead of fully coalesced frames
Trades CPU usage for cache/memory space
2021-02-03 15:49:33 +05:30
Kovid Goyal
bb5c5a8e4f
Allow gapless frames 2021-02-01 16:22:36 +05:30
Kovid Goyal
00edb6058e
Start work on implementing frame transitions
Also ensure that the correct OS Window is current when uploading images
to GPU.
2021-01-31 20:58:42 +05:30
Kovid Goyal
597267d1d0
root frame gap should be set to the gap of the first received frame 2021-01-31 20:58:42 +05:30
Kovid Goyal
b21850dd15
Implement updating of current frame on GPU 2021-01-31 20:58:42 +05:30
Kovid Goyal
4098f2d383
Add quota enforcement testing 2021-01-31 20:58:42 +05:30
Kovid Goyal
5eba754c60
Implement animation control escape codes 2021-01-31 20:58:42 +05:30
Kovid Goyal
1d20472759
Avoid a cache move when deleting frames 2021-01-31 20:58:42 +05:30
Kovid Goyal
d76e757d53
Implement delete for frames 2021-01-31 20:58:42 +05:30
Kovid Goyal
17f485d614
Basic frame loading works 2021-01-31 20:58:41 +05:30
Kovid Goyal
35f3312a1e
Use shorter cache keys 2021-01-31 20:58:41 +05:30
Kovid Goyal
ca3c49099f
Start work on tests for frame loading 2021-01-31 20:58:41 +05:30
Kovid Goyal
5a182d3d13
Store image data in a disk cache 2021-01-31 20:58:41 +05:30
Kovid Goyal
f9844ba3b0
Allow negative numbers in CSI codes 2021-01-21 07:06:43 +05:30
Kovid Goyal
e4d8aac3d5
Make CSI parsing a bit more spec compliant
Now the full list of secondary characters (intermediate bytes) is used from ECMA 48
Also the codes that accept only one parameter now report errors when
multiple parameters are passed.
2021-01-21 06:41:27 +05:30
Kovid Goyal
2a8e8d4b38
Fix #3252 2021-01-20 16:02:28 +05:30
Kovid Goyal
e6644aebcb
Add a test to ensure caps lock does not produce bytes in legacy mode 2021-01-19 09:19:34 +05:30
Kovid Goyal
39da92d8ab
Now that glfw reports shifted keys, use it when encoding key events 2021-01-17 11:14:44 +05:30
Kovid Goyal
cf04a5a036
Add tests for encode/decode roundtripping 2021-01-16 20:52:15 +05:30
Kovid Goyal
0163bf3edb
Fix enter/tab/backspace not being reported in all keys mode 2021-01-16 20:52:15 +05:30
Kovid Goyal
0714fd376b
Fix handling of ctrl key in legacy mode
Also change the glfw constants used for the modifiers to match those
used in the terminal encoding. Less likely to make mistakes translating
that way.
2021-01-16 20:52:14 +05:30
Kovid Goyal
39f41faf9f
Dont send events for modifier keys unless in all key mode 2021-01-16 20:52:14 +05:30
Kovid Goyal
c421fd56be
Ensure typing in shell works in disambiguate mode 2021-01-16 20:52:14 +05:30
Kovid Goyal
47a901385f
Implement reporting of all keys as escape codes with text 2021-01-16 20:52:13 +05:30
Kovid Goyal
819bd5cd70
Tests for alternate key reporting 2021-01-16 20:52:13 +05:30
Kovid Goyal
753ad68ca9
Add tests for event type reporting 2021-01-16 20:52:13 +05:30
Kovid Goyal
5498f4e526
... 2021-01-16 20:52:13 +05:30
Kovid Goyal
83a01b6bf4
Add tests for the disambiguate flag 2021-01-16 20:52:13 +05:30
Kovid Goyal
c519013b20
Add tests for legacy letter key encodings 2021-01-16 20:52:13 +05:30
Kovid Goyal
eeacac227a
Add tests for functional KP keys 2021-01-16 20:52:13 +05:30
Kovid Goyal
529e9f83f7
Finish up functional key tests 2021-01-16 20:52:13 +05:30
Kovid Goyal
1690718710
More removal of GLFW_KEY_ constants 2021-01-16 20:52:12 +05:30
Kovid Goyal
f06eee8fe1
Define special numbers in one place only 2021-01-16 20:52:12 +05:30
Kovid Goyal
a30ea2b7f8
Implement progressive enhancement of key event reporting 2021-01-16 20:52:12 +05:30
Kovid Goyal
d68c338304
Wait for write and check data, fixes test failure 2021-01-04 12:27:26 +05:30
Kovid Goyal
ac13ae727f
Fix failing test
We cant know what the size of the disk cache file is,
since defragmentation occurs asynchronously
2021-01-03 21:05:08 +05:30
Kovid Goyal
1b59a1c421
Finish tests of disk cache 2021-01-03 17:36:40 +05:30
Kovid Goyal
c869774c58
More tests for the disk cache 2021-01-03 06:22:48 +05:30
Kovid Goyal
18679348b2
Use usleep rather than nanosleep 2021-01-03 05:00:40 +05:30
Kovid Goyal
b3ed4c3f40
Simplify implementation of REP
Also make it align more with the standard by using the actual last drawn
graphics character rather than the character before the cursor
2021-01-03 04:38:02 +05:30
Kovid Goyal
8f58140419
Start work on tests for disk cache 2021-01-03 04:28:48 +05:30
Kovid Goyal
fe1050fc0e
More work on disk cache 2020-12-30 14:26:38 +05:30
Kovid Goyal
5f8dee8384
Add support for the color settings stack that XTerm copied from us without acknowledgement and decided to use incompatible escape codes for.
Completely in keeping with that project's past behavior.
See https://github.com/kovidgoyal/kitty/issues/879

XTerm announcement:
https://www.mail-archive.com/xorg@lists.x.org/msg06419.html
2020-12-21 21:39:05 +05:30
Kovid Goyal
e82a6dedd9
Fix deletion with image numbers 2020-12-16 18:57:46 +05:30
Kovid Goyal
d10681f27f
Send responses when only a number and no id is specified 2020-12-16 18:31:30 +05:30
Kovid Goyal
e96ff19a7a
Graphics protocol: Add support for having the terminal emulator assign image ids
Useful when multiple non co-operating programs want to share the screen.
Fixes #3163
2020-12-16 17:31:15 +05:30
Kovid Goyal
4a60413e0b
... 2020-12-03 21:38:42 +05:30
Kovid Goyal
245f5d60b5
Add a test for image put + delete + put 2020-12-03 21:37:32 +05:30
Kovid Goyal
23420adfa6
Graphics protocol: Allow suppressing responses from the terminal to graphics commands 2020-12-03 20:42:03 +05:30
Kovid Goyal
b5e704a934
Graphics protocol: Add support for giving individual image placements their
Fixes #3133
2020-12-02 05:25:19 +05:30
Kovid Goyal
05eb07caf5
Add to changelog for last merge
Also remove a spurious return that was disabling a test. Fixes #3113
2020-11-20 20:23:23 +05:30
Roman Perepelitsa
620eaf1ada Change the flow of lines from the scroll region to the scrollback
There are two user-visible changes in here:

1. If a scroll region is set such that there is a bottom margin and no
   top margin, scrolling the region forward used to discard the top
   lines. Now those lines are appended to the scrollback.
   ```shell
   # Assuming a terminal window with 24 lines.
   printf '\033[H\033[J\033[3J\033[0;5r' && seq 100
   ```
   This command used to result in an empty scrollback. Now it contains
   the numbers 1-96.
2. If a scroll region is set such that there is a top margin and no bottom
   margin, scrolling the region forward used to append the top lines to
   the scrollback. Now these lines are discarded.
   ```shell
   # Assuming a terminal window with 24 lines.
   printf '\033[H\033[J\033[3J\033[2;24r' && seq 100
   ```
   This command used to populate scrollback with the numbers 2-78. Now
   the scrollback is empty. The numbers on the screen are the same as
   before: 1 and 79-100.

Related issue: #3113.
2020-11-20 15:41:57 +01:00
Kovid Goyal
9816979169
Don't restrict the DCH control code to only the current scroll region
Matches behavior of other terminal emulators.  Fixes #3090
2020-11-12 11:44:09 +05:30
Kovid Goyal
6a755bda45
A new kitten to easily query kitty for config values 2020-10-07 13:35:16 +05:30
Sighery
10533c3eba Hints kitten: validate IPs with ipaddress
On the initial commit of this feature, IPs were just matched with a
very simple regex that prioritised simplicity/readability over
accuracy.

This commit adds a postprocessor for ip matches that makes use of
Python's `ipaddress` in the standard library to validate all the IP
matches.

This way we don't need huge and complex regex patterns to match _and_
validate the IPs, and we can just use `ipaddress` to abstract us from
implementing all the validation logic into the regex pattern.
2020-10-05 20:11:25 +02:00
Sighery
b4415c90f9 Hints kitten: add support for IPs (v4 and v6)
It selects v4 and v6 IPs with a simple regex that doesn't actually
check for the validity of the IPs.
2020-10-05 20:11:22 +02:00
Kovid Goyal
fb72be41f4
Add a test for serializing id less hyperlinks 2020-09-22 17:52:40 +05:30
Kovid Goyal
9d4246a285
Output hyperlink markup when serializing as ANSI 2020-09-22 16:18:22 +05:30
Kovid Goyal
fdaf857885
Add more tests for pagerhist 2020-09-22 09:05:40 +05:30
Kovid Goyal
444080f320
Make wcswidth useable in a streaming fashion 2020-09-21 15:55:22 +05:30
Kovid Goyal
b5007ba276
Store pager history in UTF-8
Reduces storage requirement by a fator of 4 at the cost of some CPU
usage, to encode to UTF-8
2020-09-21 12:29:10 +05:30
Kovid Goyal
bf19d2b156
Add some tests for the pagerhist code 2020-09-21 09:08:46 +05:30
Kovid Goyal
a78515e5bf
Remove the max size limit for line_as_ansi
Needed for output of hyperlinks, also more efficient, since avoids
malloc per line. Also fix pagerhist not having SGR reset at the start of
every line.
2020-09-20 11:26:59 +05:30
Kovid Goyal
581126c748
More powerful match criteria for fragments 2020-09-19 07:31:17 +05:30
Kovid Goyal
0d6bca3e5d
Allow specifying rules to perform arbitrary actions in kitty when opening URLs 2020-09-18 15:01:25 +05:30
Kovid Goyal
6461dccbdc
Make wcswidth ignore more escape codes
Needed to ignore OSC 8 hyperlinks since we will
eventually have to send those with SGR formatting to the hints
kitten.
2020-09-17 20:16:17 +05:30
Kovid Goyal
399a1f8fee
Add an option to disable OSC 8 2020-09-10 10:47:28 +05:30
Kovid Goyal
9293d9b0ed
Add some tests for hyperlink marking 2020-09-10 10:47:28 +05:30
Kovid Goyal
c8e2061e2a
Move hyperlink to end of hash table when re-referenced 2020-09-10 10:47:27 +05:30
Kovid Goyal
78dc93721d
Add tests for hyperlink storage 2020-09-10 10:47:27 +05:30
Kovid Goyal
e99d93ca30
Implement parsing of OSC 8
Also start work on storing hyperlinks with cells
2020-09-10 10:47:24 +05:30
Kovid Goyal
eca53bfab0
Add a new escape code to allow terminal programs to trigger desktop notifications
Fixes #1474
2020-08-21 20:29:54 +05:30
Kovid Goyal
67f60847ee
Fix the spawn test in the bypy environment
Required the launcher to be built since the pre-built
one was being used. Fixes #2881
2020-07-29 15:11:35 +05:30
Kovid Goyal
81bda736d8
Skip multiprocessing spawn monkeypatch test on 32bit 2020-07-28 14:15:31 +05:30
Juho Peltonen
1decae2938 Change splits layout neighbors to only include real neighbors 2020-07-11 21:35:29 +03:00
Kovid Goyal
c9252e8639
When erasing in display upto cursor, the line containing the cursor should be marked as not continued.
Also add some tests for the action of ED on continued flags
2020-06-29 14:29:03 +05:30
Kovid Goyal
50414b333a
Re-enable the spawn tesRe-enable the spawn test 2020-06-23 20:43:40 +05:30
Kovid Goyal
36a20f7b00
Temporarily disable spawn test as it is failing in the Linux build container
Will investigate later
2020-06-23 17:37:04 +05:30
Kovid Goyal
2c6e5a6e73
Get multiprocessing working in kitty
Monkeypatch the stdlib multiprocessing module to
use kitty as its python interpreter for spawning worker
processes.
2020-06-21 14:47:24 +05:30
Kovid Goyal
9fa97e6187
Merge branch 'mouse-events' of https://github.com/trygveaa/kitty 2020-06-06 22:27:54 +05:30
Trygve Aaberge
8efe08c45b Support more mouse buttons for terminal mouse events
Previously, the mouse back and forward buttons sent the same codes as
scroll up and down. Now they instead send the same codes as xterm. Mouse
button 10 (in X11 numbering) also now sends the same as xterm, instead
of not sending anything.

This also changes the `send_mouse_event` function which can be called
from kittens to use X11 numbering for mouse buttons instead of what it
previously used, which turns out to be a hybrid of X11 and GLFW. It was
documented to use GLFW numbering, but GLFW doesn't have numbers for
scroll events (that's separate events with x/y offsets) and 4 and 5 in
GLFW is actually back and forward, while `send_mouse_event` interpreted
it as scroll up and down.

That means that this is a breaking change for `send_mouse_event` because
it swaps the number for the middle and right button to be consistent
with X11. I did this because I think it's better to use one consistent
numbering scheme for the function, and because people probably know X11
numbering better than GLFW numbering and GLFW doesn't have numbers for
the scroll buttons.
2020-06-06 14:19:06 +02:00
Kovid Goyal
8b2fb105d0
Fix #2735 2020-06-05 19:24:40 +05:30
Kovid Goyal
9ba808ec3c
Merge branch 'ft/csi-code-rep' of https://github.com/keynslug/kitty 2020-06-01 14:31:34 +05:30
Andrew Mayorov
9fe631ee3f
Provide support for CSI REP control code 2020-05-29 01:05:49 +03:00
Luflosi
7931654a7c
Ensure valid UTF-8 when cutting string 2020-05-23 13:59:23 +02:00
Kovid Goyal
e97454c4a5
And ever more coalesce tests 2020-05-17 23:20:26 +05:30
Kovid Goyal
936dc74a27
Some more coalesce tests 2020-05-17 23:08:27 +05:30
Kovid Goyal
362e4266bb
Better coalescing of multiple symbol_maps
When specifying multiple symbol_map values in kitty.conf later ones
should override conflicting previous ones. Fixes #2662
2020-05-17 23:03:28 +05:30
Kovid Goyal
5e48ae8bac
pep8 2020-05-12 22:54:08 +05:30
Kovid Goyal
cdd943ded4
Port layout tests to new API 2020-05-12 22:43:55 +05:30
Kovid Goyal
c69b8870d2
Allow individually setting margins and padding for each edge (left, right, top, bottom) 2020-04-19 09:36:26 +05:30
Kovid Goyal
a08efa1fc5
Fix failing test 2020-04-17 19:57:37 +05:30
Trygve Aaberge
43af6e3b8a Add support for sending mouse events from a kitten
This allows you to a control a program running in kitty from a kitten
using mouse events. If the program is not receiving mouse events of that
type, it is not sent.
2020-04-12 16:19:50 +02:00
Kovid Goyal
b4d08044a0
... 2020-04-12 17:01:39 +05:30
Kovid Goyal
d1a5d30233
Add another test for marking 2020-04-12 16:54:38 +05:30
Kovid Goyal
082546a1e7
Marks: Fix marks not handling wide characters and tab characters correctly
Fixes #2534
2020-04-12 13:28:21 +05:30
Kovid Goyal
0862e85577
Rewrite wcswidth as a state machine 2020-04-07 10:10:30 +05:30
Kovid Goyal
6357f7b811
Update wcswidth() to match new country flag rendering 2020-04-06 22:56:34 +05:30
Kovid Goyal
342f0981d8
Add tests for selection extension by right click 2020-03-18 20:57:19 +05:30
Kovid Goyal
12f37bcfad
Dont strip trailing punctuation from end of URL if next line startswith url characters 2020-03-15 08:47:52 +05:30
Kovid Goyal
e86c712424
Dont strip :code:& and :code:- from the end of URLs
Fixes #2436
2020-03-15 08:29:56 +05:30
Kovid Goyal
917559f883
more typing work 2020-03-13 16:13:26 +05:30
Kovid Goyal
353db678a2
Add typing to box_drawing 2020-03-08 21:30:50 +05:30
Kovid Goyal
645890ccc8
Make the set of URL prefixes that are recognized while hovering with the mouse configurable
Fixes #2416
2020-03-08 13:16:34 +05:30
Kovid Goyal
c763db94ce
Fix #2401 2020-02-28 10:28:01 +05:30
Kovid Goyal
2f8002c567
Add a test for #1616 2020-02-26 09:20:08 +05:30
Kovid Goyal
294d01def6
Clear the click queue before a multi-click 2020-02-25 21:20:41 +05:30
Kovid Goyal
9a67176719
Fix scrolling selection tests 2020-02-25 20:17:49 +05:30
Kovid Goyal
42d1a4755a
Add tests for multiline movement 2020-02-25 20:03:14 +05:30
Kovid Goyal
5bbc15583e
Non-scrolling based selection tests all pass 2020-02-25 20:03:14 +05:30
Kovid Goyal
9c486f6e69
Track left to right for selections based on actual mouse positions
Cant use the selection boundaries as these can be programmatically
altered when extending selection by word or line.
2020-02-25 20:03:14 +05:30
Kovid Goyal
2f24588c66
Fix cell select mode tests 2020-02-25 20:03:14 +05:30
Kovid Goyal
6b1ea326a0
Initial implementation of half cell based selection 2020-02-25 20:03:14 +05:30
Kovid Goyal
4512d0dbac
Update test for changes to ANSI serialization 2020-02-25 19:23:05 +05:30
Kovid Goyal
6f1fda0a48
Store cell half information in selection objects 2020-02-18 17:45:07 +05:30
Kovid Goyal
84453bf15c
Add a test for #2284 2020-02-16 21:14:08 +05:30
Kovid Goyal
fdf055312c
DRYer 2020-02-13 10:07:55 +05:30
Kovid Goyal
b0b8b06b56
Scrolling test 2020-02-13 10:02:44 +05:30
Kovid Goyal
9c1ffb1adf
Test for rectangle select 2020-02-13 08:52:33 +05:30
Kovid Goyal
563bafea08
Merge options when testing 2020-02-13 08:33:57 +05:30
Kovid Goyal
3eff929652
More mouse interaction tests 2020-02-12 21:19:25 +05:30
Kovid Goyal
3010ebfef5
More mouse interaction tests 2020-02-12 19:02:38 +05:30
Kovid Goyal
ff14f47781
First mouse interaction test 2020-02-12 15:21:59 +05:30
Kovid Goyal
86174c81c8
Some tests for splits layout 2020-01-30 20:30:52 +05:30
Kovid Goyal
43326c9bd0
Fix URL detection not working for urls of the form scheme:///url
Fixes #2292
2020-01-17 07:49:01 +05:30
Kovid Goyal
2f7bdc274d
Fix failing test 2020-01-15 11:48:13 +05:30
Kovid Goyal
e8121b39ec
Add newer layout classes to tests 2020-01-15 08:14:45 +05:30
Kovid Goyal
936f2186cc
Allow scrolling to marks 2020-01-15 07:11:34 +05:30
Kovid Goyal
35fb702833
Use only a single marker function
Multipe colors/expressions can instead be combined at definition time
2020-01-13 11:57:19 +05:30
Kovid Goyal
51c4737a29
Test function marking 2020-01-13 06:50:37 +05:30
Kovid Goyal
d63ea11cac
Marking now works 2020-01-13 06:50:37 +05:30
Kovid Goyal
a649eb2a48
Coalesce neighboring symbol maps for better lookup performance 2019-11-12 20:05:48 +05:30
Kovid Goyal
32dfc94909
Implement a hack to (mostly) preserve tabs when cat a file with them and then copying the text or passing screen contents to another program
It's a simple enough hack that it seems worth doing. If it causes any
issues, can always be reverted.

Fixes #1829
2019-08-31 12:37:05 +05:30
Luflosi
5f855ce547
Use context managers to open files
Inspired by d50a6ddc1b.
2019-08-01 13:21:26 -05:00
Luflosi
2751dbdb94
Fix test_url_at
`lspace_test()` has a parameter called scheme with the default value `http`. It
is called in a nested for loop, but the scheme from the inner for loop is
just ignored.
2019-06-05 18:32:23 +02:00
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
529337e00a
Ensure cursor is correctly positioned after emoji presentation char + VS15
cursor should be on the cell immediately after the the char since the
variation selector makes the char one cell wide.
2019-05-13 20:18:41 +05:30
Kovid Goyal
fe882dad15
Add support for Vs-15 to wcswidth 2019-05-13 19:50:49 +05:30
Kovid Goyal
e33af8b2f8
Fix #1423 2019-02-26 06:56:25 +05:30
Kovid Goyal
60b64dadfe
Add tests for the subseq matcher 2019-01-24 20:52:18 +05:30
Kovid Goyal
d20c65ef80
Graphics protocol: Only delete temporary image-data files if they are in a known temporary file location 2018-12-11 10:00:43 +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
33b62dcabc
Turn on the scrollback pager for all tests 2018-11-20 10:42:17 +05:30
Kovid Goyal
db1e48848d
More robust no modifier check for CSI parsing 2018-11-19 09:53:01 +05:30
Kovid Goyal
c02fa79591
Fix #1153 2018-11-19 09:35:46 +05:30
Kovid Goyal
3e26f96744
Add some common synonyms for unicode word searching
Fixes #1133
2018-11-13 15:46:33 +05:30
Dominique Martinet
1986403e42 Add scrollback benchmark 2018-09-22 19:10:37 +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
10b15caad9 tests: add options param to create_screen()
Always apply defaults when creating a screen (the C-side global state
default will not have the intended values without this), and provide a
way to override default values with a new optional parameter
2018-09-22 18:05:13 +09:00
Kovid Goyal
a08b945124
Forgot to revert test 2018-09-09 14:02:46 +05:30
Kovid Goyal
7f0674ac27
Fix backspacing of wide characters in wide-character unaware programs not working
Fixes #875
2018-09-07 10:08:25 +05:30
Kovid Goyal
55f457caf4
macOS: Fix a character that cannot be rendered in any font causing font fallback for all subsequent characters that cannot be rendered in the main font to fail
Fixes #799
2018-09-04 14:21:36 +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
5fa5bf8142
Add a test for unicode regional indicator widths 2018-08-04 10:56:35 +05:30
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
3df78de3f8
Update pending mode escape code parsing to match latest shed color 2018-07-28 10:56:34 +05:30
Kovid Goyal
e0ff6bcc5d
Implement protocol for atomic screen updates
See https://gitlab.com/gnachman/iterm2/wikis/synchronized-updates-spec
2018-07-23 13:24:49 +05:30
Kovid Goyal
af9f7bb0d2
Generate the code to parse APC escape codes
Allows it to be re-used for other APC codes
if needed.
2018-07-19 18:43:26 +05:30
Kovid Goyal
0b7abf5690
Fix test that needed to be changed for new prerendered sprites 2018-07-19 14:21:09 +05:30
Kovid Goyal
1faddeb402
Also return image dimensions when loading PNG 2018-07-07 08:04:11 +05:30
Kovid Goyal
2b035739f8
Make the PNG reader code re-useable 2018-07-07 07:46:15 +05:30
Kovid Goyal
e35c3cc913
Add an option single_window_margin_width to allow different margins when only a single window is visible in the layout
Fixes #688
2018-06-29 09:56:05 +05:30
Kovid Goyal
815dd99f7c
Keep the Debian PC police happy
Fixes #661
2018-06-21 13:12:45 +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
7a7262923b
Fix a regression in 0.10 that caused incorrect rendering of the status bar in irssi when used inside screen.
Fixes #621. The cursor in margin check was incorrect causing upwards
movement of the cursor when below the bottom margin to be incorrect.
2018-06-11 10:13:21 +05:30
Kovid Goyal
0354e5b669
Add a PNG load test that does not depend on PIL 2018-05-31 20:15:23 +05:30
Kovid Goyal
dd20789249
Add support for the CSI t escape code to query window and cell sizes 2018-05-28 13:47:42 +05:30
Kovid Goyal
ed44515318
All tests pass 2018-05-27 12:37:05 +05:30
Kovid Goyal
523aadaa3b
Refactor font group handling
Allow kitty to manage multiple groups of fonts with different cell
sizes. Will eventually allow kitty to have different font sizes/dpi per
OSWindow
2018-05-27 12:37:05 +05:30
Kovid Goyal
48847cdaf8
hints kitten: Fix detection of URLs in ReStructuredText 2018-05-21 16:14:49 +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
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
ba9af3df8c
Fix moving cursor outside a defined page area incorrectly causing the cursor to be placed inside the page area. Caused incorrect rendering in neovim, which relies on this behavior.
Fixes #542
2018-05-19 08:04:37 +05:30
Kovid Goyal
22159c5eb4
Fix mockup for testing 2018-05-16 16:43:39 +05:30
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
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