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