Commit Graph

127 Commits

Author SHA1 Message Date
Kovid Goyal
a0aba4da4a
Fix handling of tab character when cursor is at end of line and wrapping is enabled
Fixes #7250
2024-03-23 08:43:06 +05:30
Kovid Goyal
f64739c29b
Fix regression that broke handling of single byte control chars when cursor is on second cell of wide character 2024-02-25 09:57:41 +05:30
Kovid Goyal
1f835b27c4
start work on implementing pending mode as paused rendering 2024-02-25 09:57:32 +05:30
Kovid Goyal
a9f5519d11
Add tests for writing with cursor on trailer of wide char 2024-02-25 09:57:30 +05:30
Kovid Goyal
8dca5a6b9a
... 2024-02-25 09:57:26 +05:30
Kovid Goyal
6205fb32fd
Refactor VT parser for more speed
No longer copy bytes into a separate buffer, instead parse them in place
in the read buffer
2024-02-25 09:57:23 +05:30
Kovid Goyal
f42b49e597
Avoid a double parse for pending mode 2024-02-25 09:57:23 +05:30
Kovid Goyal
52025ff030
misc parser and test fixes 2024-02-25 09:57:22 +05:30
Kovid Goyal
5168e0b576
Port parse_bytes() used in the tests 2024-02-25 09:57:22 +05:30
Kovid Goyal
8cc2cad4d9
Use list of legal chars in URL from the WHATWG standard
Notably this excludes some ASCII chars: <>{}[]`|
See https://url.spec.whatwg.org/#url-code-points

Fixes #7095
2024-02-05 13:27:22 +05:30
Kovid Goyal
77292a16d6
Make shebangs consistent
Follow PEP 0394 and use /usr/bin/env python so that the python in the
users venv is respected. Not that the kitty python files are meant to be
executed standalone anyway, but, whatever.

Fixes #6810
2023-11-11 08:32:05 +05:30
Kovid Goyal
77140fc798
Fix #6803 2023-11-10 08:49:33 +05:30
Kovid Goyal
5d5bbe9b96
Add a paragraph on legacy xterm compat for pointer shapes 2023-10-15 21:59:04 +05:30
Kovid Goyal
1693107608
A new escape code to change the shape of the mouse pointer
Fixes #6711
2023-10-15 19:57:36 +05:30
Kovid Goyal
1f91250a40
Fix trailing bracket not ignored when detecting a multi-line URL with the trailing bracket as the first character on the last line
Fixes #6710
2023-10-13 10:44:58 +05:30
Kovid Goyal
7fe5d7b58f
Replace isort with ruff 2023-01-09 16:47:42 +05:30
Kovid Goyal
6e4376e44e
A few more wrapping serialization tests 2022-12-27 09:11:15 +05:30
Kovid Goyal
f6801d48d1
Add a test to ensure \n does not change wrapping status 2022-12-27 08:48:26 +05:30
Kovid Goyal
68cf9f7514
Switch to tracking linewrap on the last cell in a line
This allows us to have newline not affect the wrap status of a line.

Now a lines wrapping status is changed only when the last cell
in the line is changed. This actually matches the behavior of many other
terminal emulators so is probably a good thing from a ecosystem
compatibility perspective.

The fish shell expects this weird behavior of newline not changing
wrapping status, for unknown reasons, which is the actual motivation for
doing all this work.

Fixes #5766
2022-12-26 20:26:21 +05:30
Kovid Goyal
c2ead407ae
... 2022-10-31 18:14:38 +05:30
Kovid Goyal
16b322616a
Fix cursor position at x=0 changing to x=1 on resize
Fixes #5635
2022-10-31 08:03:42 +05:30
pagedown
6c80cd040c
Fix missing last line when getting output of the running command 2022-07-02 12:33:58 +08:00
Kovid Goyal
e9340dfaaf
Some more tests for last non empty command output 2022-05-28 15:22:17 +05:30
Kovid Goyal
0509855930
Allow getting the last non-empty command output easily via an action or remote control
Fixes #4973
2022-05-28 15:19:24 +05:30
Kovid Goyal
0a5c16363c
Fix continued lines not having their continued status reset on line feed
Fixes #4837
2022-03-16 15:20:25 +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
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
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
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
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +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
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
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
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
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
82d11b80dd
Add a test for filling from scrollback with large continued line 2021-04-09 17:04:55 +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
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