Commit Graph
99 Commits
Author SHA1 Message Date
Kovid Goyal 495981bade Pass failure to send data to child because of full buffer up the stack 2021-08-25 13:28:50 +05:30
Kovid Goyal 37735b962e Start work on new file_transmission protocol 2021-08-19 09:23:01 +05:30
Kovid Goyal 2715947830 DRYer 2021-08-18 10:06:10 +05:30
Kovid Goyal fa327d618d Cursor movement at shell prompts on click
Fixes #3825
2021-08-18 10:06:07 +05:30
Kovid Goyal 46b9aca16e Start work on shell integration 2021-08-18 10:06:04 +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 5c7ce18379 Move visual bell code into shaders.c 2021-08-11 12:04:52 +05:30
Andrew Mayorov aff6fdfa84 Make visual bell flash much more gentle
Right now visual bell makes background flash sharply with bright white
(when configured with darkish color theme). This causes eye strain,
especially prominent in unlit environments.

This change makes background bounce smoothly between regular bg color
and highlight (selection) bg color for the configured visual bell
duration. Intensity is animated with cubic easing functions. It
currently peaks at 20% of the duration, this is hardcoded.

Mark functions computing intensity and easing as inline

Do smarter blending of visual bell flash

Blend highlight color with pegtop's softlight mode over both background
and half as much over foreground. This should help with flash visibility
in light themed and inverted colors contexts.

Blend flash in BACKGROUND pass also

Revert "Do smarter blending of visual bell flash"

This reverts commit 9a269d55c7d04334b1c4891c42914423517dfad6.

Revert "Blend flash in BACKGROUND pass also"

This reverts commit 756332cb9d7576b08db78406e37349aa6d1df156.

Revert "Make visual bell flash much more gentle"

This reverts commit cbfe5d59ada2da690e14c7532a7468b0c307c462.

Render flash overlay in a separate drawcall

Trigger frequent repaints to make for smooth animation

Attenuate flash a bit more
2021-08-11 11:54:43 +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 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 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 057084a708 Add support for XTVERSION version reporting escape code 2021-06-14 10:20:50 +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 7a40959f13 Add a configurable mouse action to select from the clicked point to the end of the line.
Fixes #3585
2021-05-11 09:01:52 +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 0372242d12 Use an enum for UTF8 decoder state 2021-03-31 15:19:27 +05:30
Kovid Goyal d360d077d1 Handle the XTMODKEYS escape code
Treat the XTerm specific modifyOtherKeys escape codes as putting the
disambiguate mode on/off the stack. The escape code causes XTerm to use
a (broken, naturally) variant of CSI u encoding for many keys, so we
treat it as going into the disambiguate mode.
2021-03-16 17:46:11 +05:30
Kovid Goyal ac2a33d09f Silence the errors about OSC 7
Up to now this poorly designed and completely unnecessary escape code
was relegated to only GNOME, however, off late Apple has started using
it as well, so silently ignore it, instead of spamming error messages
for it.
2021-01-29 12:43:41 +05:30
Kovid Goyal f9844ba3b0 Allow negative numbers in CSI codes 2021-01-21 07:06:43 +05:30
Kovid Goyal a30ea2b7f8 Implement progressive enhancement of key event reporting 2021-01-16 20:52:12 +05:30
Kovid Goyal c8a9336160 Code to encode key events 2021-01-16 20:52:12 +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 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 e97f1a4310 Have the save/restore colors escape codes also save restore the ANSI color table 2020-12-21 19:38:03 +05:30
Kovid Goyal 19870983ca Allow specifying text formatting in tab_title_template
Fixes #3146
2020-12-08 21:42:40 +05:30
Kovid Goyal b00cd5cbc3 Match save/restore cursor behavior of other terms
For the sake of interoperability. This means that doing a DECRC without
a prior DECSC is now undefined. However, one can now issue multiple
DECRC for a single DECSC. Fixes #1264
2020-12-01 17:55:17 +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 4a75952fc7 Implement marking of hyperlinks 2020-09-10 10:47:27 +05:30
Kovid Goyal 00ea189074 Infrastructure to support multiple selection ranges
Needed for hyperlinks, that can be discontinuous
2020-09-10 10:47:27 +05:30
Kovid Goyal 33beecddda Implement storage of URLs in a hash map 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 9a54da84dc Add a setting tab_activity_symbol
Fixes #2515
2020-09-08 21:54:56 +05:30
Kovid Goyal 5937892ebc Move focus tracking into the Screen object 2020-09-07 09:31:44 +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 1af426bf84 Add support for legacy DECSET codes 47, 1047 and 1048
Fixes #2871
2020-07-22 09:00:51 +05:30
Kovid Goyal 7824739034 Ensure selection GPU buffer is refreshed after a resize
Fixes #2747 (I hope since I cannot reproduce)
2020-06-13 22:59:46 +05:30
Andrew Mayorov 9fe631ee3f Provide support for CSI REP control code 2020-05-29 01:05:49 +03:00
Kovid Goyal 3bff3bcbe4 Fix selection not updating properly while scrolling
Fixes #2442
2020-03-18 18:48:59 +05:30
Kovid Goyal e84163e838 Remove unused code 2020-02-26 07:31:43 +05:30
Kovid Goyal 3a64b835fb DRYer 2020-02-26 07:28:39 +05:30
Kovid Goyal c4b2de8939 Refactor function to not combine input and output parameters 2020-02-25 21:49:31 +05:30
Kovid Goyal 1690e6933f Clean up handling of scrolling in selections 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 6b1ea326a0 Initial implementation of half cell based selection 2020-02-25 20:03:14 +05:30
Kovid Goyal 6f1fda0a48 Store cell half information in selection objects 2020-02-18 17:45:07 +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 23bc2171c9 Avoid a double call for mark functions 2020-01-13 06:50:36 +05:30
Kovid Goyal 0b3602f764 Code to add markers to Screen 2020-01-13 06:50:36 +05:30