218 Commits

Author SHA1 Message Date
Mitchell Hashimoto
1127330b3a font/coretext: score discovered fonts 2023-10-03 09:17:41 -07:00
Mitchell Hashimoto
a1a8aeb104 initial window size needs to take into account window chrome 2023-09-30 21:35:50 -07:00
Mitchell Hashimoto
56b0cb51d5 apprt/gtk: previous_tab/next_tab action do not consume if there are no tabs 2023-09-29 22:12:38 -07:00
Mitchell Hashimoto
a85c508892 apprt/gtk: add ctrl+page-up/down as prev/next tab 2023-09-29 22:04:30 -07:00
Mitchell Hashimoto
3569073ff5 core: handle unconsumed bindings in key callbacks 2023-09-29 21:37:30 -07:00
Mitchell Hashimoto
f9962a04ef recomment line 2023-09-29 20:01:26 -07:00
Mitchell Hashimoto
ecb1d19890 input: fix regression with ascii mapping to a keypad key 2023-09-29 20:00:50 -07:00
Tim Culverhouse
488e6670c2 selection: only clear when keypress has utf8
Currently, the selection on a surface is cleared on any keypress that
generates a control sequence. For applications that enable kitty, this
can mean that every keypress clears the current selection thereby making
it impossible to copy text, since it will be cleared as soon as Control
is pressed. This can be very confusing to terminal users: some
applications I can shift+highlight and copy+paste, some I can't - and
unless I know the implementation of the application I won't know
why...very frustrating.

Only clear the selection when there is printable text, otherwise retain
the selection. From my testing, this makes text selection feel the same
between applications using kitty keyboard and applications that don't.
2023-09-29 16:07:21 -05:00
Nathan Youngman
73331887fe fabs builtin was renamed
https://github.com/ziglang/zig/pull/17248

I just tried installing from source and ran into the error:

> error: invalid builtin function: '@fabs'
2023-09-28 15:29:08 -07:00
Mitchell Hashimoto
28b7782bbe core: do not scroll viewport if mouse reporting is requested
Fixes #570
2023-09-28 09:50:44 -07:00
Mitchell Hashimoto
010338354a core: normalize newlines in non-bracketed pastes
Fixes #547

For non-bracketed paste mode, "\r\n" => "\r" and "\n" => "\r". See the
issue for more supporting documentation.
2023-09-26 14:36:07 -07:00
Mitchell Hashimoto
8c4d25050a apprt/gtk: detect keyboard modifier state for mouse events 2023-09-26 12:37:59 -07:00
Mitchell Hashimoto
57d81ba9e1 core: disable styles 2023-09-26 08:39:36 -07:00
Mitchell Hashimoto
17c0e7f75f config: font style is a union 2023-09-26 08:13:11 -07:00
Mitchell Hashimoto
96f835b78b core: shift does not send mouse events
Fixes #542
2023-09-26 07:52:22 -07:00
Mitchell Hashimoto
c2cc2b8f03 core: hook up the codepoint map to the loaded font group 2023-09-24 20:35:05 -07:00
Mitchell Hashimoto
52591161bc config: add font-style configurations 2023-09-24 09:13:25 -07:00
Mitchell Hashimoto
b7055e2026 core: send proper reporting code for alt not super 2023-09-21 08:49:14 -07:00
Mitchell Hashimoto
b30feeb596 core: move clipboard to async process 2023-09-19 10:18:17 -07:00
Mitchell Hashimoto
008738df56 core: only prevent repeat mouse events for motion
Fixes #485
2023-09-18 09:15:26 -07:00
Mitchell Hashimoto
dbd8add23e core: don't send release events for key bindings
Fixes #482
2023-09-17 14:31:15 -07:00
Mitchell Hashimoto
ef7e0f7fdb core: mouse reports should always send on release even if outside
Fixes #481
2023-09-17 14:22:40 -07:00
Mitchell Hashimoto
36c9d607b2 core: do not send repeat mouse events if cell didn't change 2023-09-17 11:49:25 -07:00
Mitchell Hashimoto
ab4acf0d00 core: send mouse motion events if motion tracking and button pressed 2023-09-17 11:45:53 -07:00
Mitchell Hashimoto
d6b827cce7 core: all SGR mouse report modes can tell button differences
Fixes #478
2023-09-17 10:24:51 -07:00
Mitchell Hashimoto
dd85f6c41d core: do not emit mouse report events if position is outside surface 2023-09-17 09:56:26 -07:00
Mitchell Hashimoto
ef9ed48434 Merge pull request #463 from mitchellh/osc52-invalid
core: resiliency to invalid base64 data for OSC 52
2023-09-14 20:33:51 -07:00
Mitchell Hashimoto
70420fe0d6 core: resiliency to invalid base64 data for OSC 52
Fixes #460
2023-09-14 20:13:13 -07:00
Mitchell Hashimoto
a5a93013b3 if mouse hide setting changes to false, show mouse immediately 2023-09-14 19:54:28 -07:00
Mitchell Hashimoto
a7e8b7559e mouse-hide-while-typing config and glfw implementation 2023-09-14 17:36:21 -07:00
Mitchell Hashimoto
cb2931cb27 rename cursor shape to mouse shape for OSC 22 2023-09-14 11:12:17 -07:00
Mitchell Hashimoto
7734bab8c4 terminal: cursor shape parsing, hook up to apprt callback 2023-09-14 10:12:38 -07:00
Mitchell Hashimoto
b4d2818522 typo in loading emoji font for linux 2023-09-13 15:28:08 -07:00
Mitchell Hashimoto
d381cefb8f bring back built-in emoji font for Linux 2023-09-13 15:27:01 -07:00
Mitchell Hashimoto
5e75752d7d core: do not preload Apple Emoji, our fallback search can find it 2023-09-13 14:42:56 -07:00
Mitchell Hashimoto
e459f0f94b core: do not do emoji font fallback on Linux
Our font discovery mechanism is capable of finding this.
2023-09-13 14:41:01 -07:00
Mitchell Hashimoto
a2236d1ceb font: fallback search must verify presentation 2023-09-13 14:27:04 -07:00
Mitchell Hashimoto
678bd0de0c core: surface should not use app mailbox
The surface runs on the same thread as the app so if we use the app
mailbox then we risk filling the queue before it can drain. The surface
should use the app directly.

This commit just changes all the calls to use the app directly. We may
also want to coalesce certain changes to avoid too much CPU but I defer
that to a future change.
2023-09-13 08:34:09 -07:00
Mitchell Hashimoto
56ccadd7f1 core: app needsConfirmQuit to streamline quitting if no active sessions 2023-09-11 15:44:08 -07:00
Mitchell Hashimoto
d9cfd00e9f Big Cursor State Refactor
This makes a few major changes:

  - cursor style on terminal is single source of stylistic truth
  - cursor style is split between style and style request
  - cursor blinking is handled by the renderer thread
  - cursor style/visibility is no longer stored as persistent state on
    renderers
  - cursor style computation is extracted to be shared by all renderers
  - mode 12 "cursor_blinking" is now source of truth on whether blinking
    is enabled or not
  - CSI q and mode 12 are synced like xterm
2023-09-09 20:19:37 -07:00
Mitchell Hashimoto
4570356e57 turn zoom into a toggle rather than an explicit zoom/unzoom 2023-09-02 16:03:51 -07:00
Mitchell Hashimoto
519a97b782 core: add unzoom_split binding 2023-09-02 15:15:12 -07:00
Mitchell Hashimoto
50a1a52ae3 core: add zoom keybinding for splits 2023-09-02 14:52:43 -07:00
Mitchell Hashimoto
22eb533473 content scale change events should also impact viewport padding
This calculates the new padding pixel values and propogates those
changes to the renderer.
2023-09-02 11:00:51 -07:00
Mitchell Hashimoto
6c7ccae848 Merge pull request #385 from mgeist/update-font-dpi
Update font DPI when the content scale is updated
2023-09-02 10:41:07 -07:00
Mat
9e5ced2600 use a const scoped block for font size 2023-09-02 13:39:29 -04:00
Mat
0d094f244e Update font DPI when the content scale is updated 2023-09-02 13:00:04 -04:00
Will Pragnell
86122624e0 macos: add visible-menu non-native-fullscreen option 2023-09-01 21:45:45 -07:00
Mitchell Hashimoto
e2fae7ab2b surface should default to default cursor, blinking should check selected 2023-08-30 08:12:38 -07:00
Mitchell Hashimoto
906852976b config: new "font-variation" set of configurations to set variable font 2023-08-28 07:25:09 -07:00