Commit Graph

106 Commits

Author SHA1 Message Date
Kovid Goyal
da5e37620e
Also test changing of title when running command 2022-02-21 21:17:52 +05:30
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +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
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
4d0d0b205d
Improve parser error messages a bit 2021-05-17 21:29:54 +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
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
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
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
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
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
Andrew Mayorov
9fe631ee3f
Provide support for CSI REP control code 2020-05-29 01:05:49 +03: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
e33af8b2f8
Fix #1423 2019-02-26 06:56:25 +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
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
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
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
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
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
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
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
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
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
747f7b076d
Implement control code for deleting images 2017-10-08 22:51:00 +05:30
Kovid Goyal
28ae99ed37
More work on displaying images 2017-09-30 14:46:17 +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
8e5c4b6f7a
Require data size to be sent for PNG format 2017-09-30 13:51:50 +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