2094 Commits

Author SHA1 Message Date
Thorsten Ball
a76aea4d0a macOS: new split can inherit font size 2023-08-19 09:59:04 +02:00
Thorsten Ball
2e9b787668 macOS: new window can inherit font size
This is the second part of #281 and adds the same mechanism that was
added for tabs in #296 for windows.

It works exactly the same way.
2023-08-19 09:29:56 +02:00
Mitchell Hashimoto
0ca6957d0c renderer/{metal,opengl}: need to premult our cell alpha to have effect 2023-08-18 18:38:47 -07:00
Mitchell Hashimoto
e92021e0c9 config: repeatablestring must copy values it parses into arena 2023-08-18 18:13:19 -07:00
Mitchell Hashimoto
4f5460475c Merge pull request #296 from mitchellh/mrn/macos-inherit-font-size
macOS: inherit font size when creating new tab
2023-08-18 09:22:06 -07:00
Mitchell Hashimoto
a960faa2b8 apprt/embedded: use setfontsize so that the original font size is
retained
2023-08-18 09:13:59 -07:00
Mitchell Hashimoto
96fc1c55ef Merge pull request #304 from mitchellh/mouse-scroll
mouse scroll events were flipped for non-cursor key events
2023-08-18 09:10:09 -07:00
Mitchell Hashimoto
79971c62a6 macos: pass around a base surface_config_s rather than a new tab 2023-08-18 09:09:43 -07:00
Mitchell Hashimoto
95b88d38c2 mouse scroll events were flipped for non-cursor key events
Fixes #302
2023-08-18 08:45:24 -07:00
Mitchell Hashimoto
8435d45bc9 terminal: proper reverseIndex behavior with scroll region set
Fixes #298

This fix is quite simple and the code should be more or less obvious:
we weren't handling scroll regions properly for the reverse index (RI)
escape sequence.
2023-08-18 08:32:13 -07:00
Mitchell Hashimoto
0bdd73797e Fix rendering issues with bash shell integration (#301)
* shell-integration/bash: we need to wrap escape sequences in brackets

* nix: install bashInteractive on Linux
2023-08-17 22:42:26 -07:00
Thorsten Ball
cda87a6963 embedded: use separate struct to pass options to new_tab_cb 2023-08-18 06:50:47 +02:00
Mitchell Hashimoto
9d61212451 Simplify Bash Integration (#299)
* shell-integration: new bash integration that is much simpler

* shell-integration: bash fixes
2023-08-17 21:50:42 -07:00
Mitchell Hashimoto
68a9110d8e build: make glfw opt-in on all platforms, default to GTK on Linux
The GLFW build has grown farther and farther in feature parity with GTK
on Linux. And on macOS, the GLFW build has been unstable (crashes) for
months.

I still find the GLFW build useful for testing some core terminal work,
but it is increasingly user-hostile in case someone just downloads the
project and does a `zig build`.

I keep GLFW as up to date as I can, but the features that are missing
are due to fundamental limitations:

  - GLFW has no tabs, splits, etc. because it has no UI elements.
    I am not interested in painting UI widgets from scratch.

  - GLFW cannot support keyboard layouts robustly because it has no
    hooks to detect keyboard layouts or functions to get keymaps.

  - GLFW cannot support the Kitty keyboard protocol because the
    key/char API is too high level and it provides no low-level
    alternatives.

  - GLFW crashes on macOS under certain scenarios (this is my problem).
    I'm not interested in fixing it because the AppKit-based build
    is highly recommended.

To build or run the GLFW build you must now explicitly pass in
`-Dapp-runtime=glfw` to `zig build`.
2023-08-17 16:27:03 -07:00
Mitchell Hashimoto
fe1e879ec7 termio: disable kitty keyboard protocol for glfw
See comment.
2023-08-17 15:08:39 -07:00
Mitchell Hashimoto
c8a07abdf3 terminal: ignore SOH/STX, bash sends this for some reason 2023-08-17 13:40:11 -07:00
Mitchell Hashimoto
a058bcbdb0 shell-integration: add bash script (no auto-inject yet) 2023-08-17 13:26:06 -07:00
Mitchell Hashimoto
b7e1122224 input: remove old TODO. This is handled now in the app runtimes 2023-08-17 12:59:22 -07:00
Mitchell Hashimoto
72f5370066 apprt/glfw: always say alt is consumed on macos 2023-08-17 12:51:07 -07:00
Thorsten Ball
d2dae7a696 macOS: inherit font size when creating new tab
This is one part of #281.
2023-08-17 20:56:56 +02:00
Mitchell Hashimoto
91456fe420 input: repeat events need to be handled for Kitty w/o report events 2023-08-17 11:23:13 -07:00
Mitchell Hashimoto
78080f0cd6 input: proper optional entry handling 2023-08-17 09:52:44 -07:00
Mitchell Hashimoto
6493da0dd3 input: Kitty encodes alternate keys 2023-08-17 09:51:16 -07:00
Mitchell Hashimoto
fe0e1f5ee8 input: key must provide unshifted codepoint 2023-08-17 09:40:32 -07:00
Mitchell Hashimoto
37daf02804 core: use Kitty encoding if enabled 2023-08-17 09:02:43 -07:00
Mitchell Hashimoto
fb9dc74b29 input: lot more Kitty encoding logic 2023-08-17 08:55:37 -07:00
Mitchell Hashimoto
91ba53b081 input: KittySequence for encoding sequences 2023-08-17 08:43:40 -07:00
Mitchell Hashimoto
c5177f6609 input: begin kitty key encoding logic (not working yet) 2023-08-16 22:08:16 -07:00
Mitchell Hashimoto
b42178bf34 input: add kitty keymap data 2023-08-16 22:08:05 -07:00
Mitchell Hashimoto
f60066a64d terminfo: add fullkbd for kitty keyboard protocol 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
af4ede40f1 terminal: implement CSI = u for setting kitty keyboard flags 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
a9d7e0eb7f terminal: parse kitty query, push, pop keyboard flags 2023-08-16 17:31:05 -07:00
Mitchell Hashimoto
c80b1bed75 terminal: add Kitty key flags, stack 2023-08-16 17:31:04 -07:00
Mitchell Hashimoto
07d722b77e bindings should not use consumed modifiers
Over time, they probably should, but GTK is a bit too aggressive right
now with consumed modifiers and I need to take a closer look at that.
2023-08-16 17:09:17 -07:00
Mitchell Hashimoto
9cef09c58d input: do not send ctrl-sequences for ctrl-i,m,[ 2023-08-16 14:17:31 -07:00
Mitchell Hashimoto
2ff2e018ba input: clarify why we use all mods for unicode CSI u 2023-08-16 14:04:38 -07:00
Mitchell Hashimoto
dcf9cdd8bf input: CSI u encoding for modified unicode chars 2023-08-16 13:57:17 -07:00
Mitchell Hashimoto
33bef28850 rename key2callback to keycallback 2023-08-16 13:40:57 -07:00
Mitchell Hashimoto
4e8f5d3997 remove charCallback/keyCallback 2023-08-16 13:39:44 -07:00
Mitchell Hashimoto
dd385cc633 apprt/glfw: convert to new key2callback 2023-08-16 13:34:31 -07:00
Mitchell Hashimoto
cd90b2a716 apprt/embedded: only call new key2callback 2023-08-16 13:26:22 -07:00
Mitchell Hashimoto
896d0e8fcf apprt/gtk: only use key2callback 2023-08-16 13:02:31 -07:00
Mitchell Hashimoto
83ba2b9825 apprt/gtk: clean up keyval_unicode usage 2023-08-16 12:51:00 -07:00
Mitchell Hashimoto
1a918bc64b apprt/gtk: call new key2callback using the all-in-one key event 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
c254a8b09e input: encoding should always write to the buf 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
aadb78394b input: legacy encoding never emits sequence during dead key state 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
9b90692fc7 core: start on key2Callback for the new callback that uses KeyEncoder 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
a2d4e7ce29 input: legacy key encoding handles alt-as-esc for general utf8 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
871f797758 input: KeyEncoder handles the charCallback stuff now too 2023-08-16 12:48:48 -07:00
Mitchell Hashimoto
6555bb1410 input: KeyEncoder legacy encoding handles old keyCallback logic 2023-08-16 12:48:48 -07:00