133 Commits

Author SHA1 Message Date
pagedown
823db08712
IME: Right align overlay when typing at the edge of the screen
When the cursor is at the right edge of the screen, push the overlay to
the left to display the pre-edit text just entered.
2023-03-04 16:11:29 +08:00
pagedown
126aaddccb
IME: Render overlay at the last visible cursor position with a separate cursor
Fix the problem caused by wrong cursor coordinates. No more messing with
the main cursor, instead the cursor is saved when receiving a pre-edit
text update and used for drawing later.

Update the overlay to the last visible cursor position before rendering
to ensure it always moves with the cursor. Finally, draw the overlay
after line rendering is complete, and restore the line buffer after
updating the rendered data to ensure that the line text being read is
correct at all times.

This also improves performance by only rendering once when changes are
made, eliminating the need to repeatedly disable and draw after various
commands and not even comprehensively.
2023-02-22 22:36:06 +08:00
pagedown
947dc2ff75
IME: Fix IME commit text and update pre-edit at the same time
Correctly update the overlay position when cursor visibility changes.
Restore the overlay line only when the cursor is visible.
Clear the saved overlay when drawing new pre-edit text.
Also update the cursor position when screen size changes.
Use four spaces to indent instead of two.
2023-02-10 10:50:32 +08:00
Jake(Jaehak Song)
b799eba81e
Save the overlay when DECTCEM is turned off and restore it when turned on. 2023-01-15 13:01:43 +05:30
Kovid Goyal
f4ac03b791
Show the target of terminal hyperlinks when hovering over them with the mouse
Fixes #5830
2022-12-29 16:43:45 +05:30
Kovid Goyal
7a348d6ef1
Store updated tab bar edge colors on every tab bar redraw 2022-12-04 14:38:56 +05:30
Kovid Goyal
c856d5c058
Fix hyperlinks not present when fetching text from the history buffer
Fixes #5427
2022-08-28 08:54:53 +05:30
Kovid Goyal
7215c6d6be
ssh kitten: Allow pressing Ctrl-C to abort ssh before the connection is completed
Fixing this involved adding a new mode to kitty where it handles
ctrl-c/z/q by sending signals to the tty foreground process group
instead of delegating to the kernel to do that. Since the pipe may be
full we have no way of knowing when the kernel will get around to
reading the signal byte. So send the signal ourselves.

Fixes #5271
2022-07-20 19:11:14 +05:30
Kovid Goyal
a89e1b5573
Fix horizontal wheel events not being reported to client programs when they grab the mouse
Fixes #2819
2022-06-18 06:47:42 +05:30
Kovid Goyal
cb7aed3234
DRYer 2022-03-24 11:54:13 +05:30
Kovid Goyal
6dc1617429
Avoid flicker when starting kittens such as the hints kitten
Fixes #4674
2022-03-23 15:55:11 +05:30
Kovid Goyal
1be1864657
Allow sending more than a screenful of output from a kitten
Also Fixes #4866
2022-03-23 14:33:53 +05:30
Kovid Goyal
e33bf11012
Store last reported CWD via OSC 7
Can be used with shell integration to give more accurate
cwd detection and also combined with the ssh kitten
to magically open new windows connected to remote servers
at the correct cwd on the remote server instantly.
2022-03-14 22:00:41 +05:30
Kovid Goyal
3b724c8415
Start work on SSH askpass implementation 2022-03-11 16:44:08 +05:30
Kovid Goyal
f37d947dd5
more work on ssh data transmission 2022-03-03 21:24:42 +05:30
Kovid Goyal
cf01480ec8
An echo escape code to echo data via the TTY 2022-03-03 21:24:42 +05:30
Kovid Goyal
ef5c66ee17
Dont bother with new escape code for setting title
Since we are only sending the last command, it cannot have CSI
sequences in it anyway except in extremely contrived situations, so just
strip all ctrl chars out.
2022-02-27 10:55:02 +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
b91809eaa4
Allows to open the command output in pager by mouse click 2021-11-17 22:25:49 +08:00
pagedown
aebf654e15
Add command output mouse selection 2021-11-16 18:15:53 +08:00
Kovid Goyal
c96e6822e1
Dont rely on historybuf->count being a constant
This may become dynamically resizable someday
2021-11-15 15:17:34 +05:30
pagedown
9fe9c74021
Save the last jumped prompt position 2021-11-15 15:17:33 +05:30
Kovid Goyal
4fb29e1b6b
Infrastructure to render the unfocused cursor in multiple windows 2021-11-12 20:42:37 +05:30
Kovid Goyal
588313b9ac
Dont re-render window chars unless needed 2021-11-01 20:38:19 +05:30
Kovid Goyal
9517c3500d
Allow visually selecting upto 36 windows
Also dont draw the window title if the window is too small
2021-11-01 10:46:54 +05:30
Kovid Goyal
93dbcab10a
Refactor code to get cell colors 2021-10-28 13:35:30 +05:30
Kovid Goyal
0fdafd8398
Allow rendering the cursor with reverse video
Also clean up handling of dynamic global colors.
TODO: Implement none for selection_fg
TODO: Add some tests
TODO: Check that changing colors via remote control works

Fixes #126
2021-10-28 00:21:12 +05:30
Kovid Goyal
729cea88f3
More sophisticated OSC 133 parsing with support for secondary prompts 2021-10-22 11:54:54 +05:30
Kovid Goyal
a653233050
Fix #4117 2021-10-14 14:31:11 +05:30
Kovid Goyal
c3f4e734f1
API to set screen window number 2021-10-11 18:00:18 +05:30
Kovid Goyal
d6a43a7729
Dont turn on disambiguate keys when receiving th XTMODKEYS escape code
See #4075
2021-10-01 21:26:27 +05:30
Kovid Goyal
eeb02ceef4
Shell integration: Workaround bash not redrawing multiline prompts 2021-10-01 09:30:26 +05:30
Kovid Goyal
10fbf36e92
Silence bells caused by cursor movement after click at prompt 2021-09-29 10:27:13 +05:30
Kovid Goyal
2a8fd278c1
Bring implementation of XTSAVE and XTRESTORE into line with xterm
Now a stack of depth 1 is used to save/restore private mode values. And
saving/restoring individual modes is supported. This latter is used by
midnight commander.
2021-09-14 21:59:41 +05:30
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