2837 Commits

Author SHA1 Message Date
Mitchell Hashimoto
bf71bdc1fb Merge pull request #389 from mitchellh/csi-p
terminal: CSI P must shift all remaining columns to right of cursor
2023-09-02 11:34:46 -07:00
Mitchell Hashimoto
aa04c79586 terminal: CSI P must shift all remaining columns to right of cursor
Fixes #388
2023-09-02 11:28:37 -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
Mitchell Hashimoto
d6bfa8183e Merge pull request #384 from mitchellh/macos12-split-focus
macos: hacks for split focus to work correctly on macos 12
2023-09-02 09:18:51 -07:00
Mitchell Hashimoto
1626c8cd3a macos: hacks for split focus to work correctly on macos 12 2023-09-02 09:15:50 -07:00
Mitchell Hashimoto
7ab70ecd0a Merge pull request #380 from mitchellh/goonz/non-native-fullscreen-menu-options
macos: add hidden-menu/visible-menu non-native-fullscreen opts
2023-09-02 07:51:44 -07:00
Will Pragnell
f6e2b50732 macos: fix non-native-fullscreen menu & dock visibility bugs 2023-09-01 21:45:45 -07:00
Will Pragnell
86122624e0 macos: add visible-menu non-native-fullscreen option 2023-09-01 21:45:45 -07:00
Mitchell Hashimoto
7408971d6d Merge pull request #379 from mitchellh/macos12-horror
macos: hacks to grab surface focus on macOS 12
2023-09-01 16:40:58 -07:00
Mitchell Hashimoto
e0015a0d00 macos: hacks to grab surface focus on macOS 12
See comment in code.
2023-09-01 16:23:30 -07:00
Mitchell Hashimoto
508f17bdef update README to hide glfw 2023-09-01 15:07:56 -07:00
Mitchell Hashimoto
b67811d3c8 Merge pull request #376 from mitchellh/macos-color-space
macos: default to sRGB color space
2023-09-01 15:06:02 -07:00
Karol Bakunowski
d7072cd29e macos: default to sRGB color space 2023-09-01 15:05:16 -07:00
Mitchell Hashimoto
4ae1f821d2 Merge pull request #375 from mitchellh/macos-free
macos: break reference cycle to window to allow window to free memory
2023-09-01 09:25:51 -07:00
Mitchell Hashimoto
d945640401 macos: break reference cycle to window to allow window to free memory
Fixes #366

The comment in the Swift code explains what was happening here:

> I don't know if this is the right place, but because of WindowAccessor in our
> SwiftUI hierarchy, we have a reference cycle between view and window and windows
> are never freed. When the window is closed, the window controller is deinitialized,
> so we can use this opportunity detach the view from the window and break the cycle.

An alternate solution would be to make our reference back to the window
"weak" but we appear to not be able to do that with SwiftUI property
wrappers such as `@State` and `@Binding` and so on.
2023-09-01 09:12:03 -07:00
Mitchell Hashimoto
a6007cab7a terminal: fix unimplemented origin mode check 2023-09-01 08:46:53 -07:00
Mitchell Hashimoto
6bb3885271 Merge pull request #373 from mitchellh/update-libxev
update libxev to fix CPU issue on macos
2023-09-01 08:29:20 -07:00
Mitchell Hashimoto
dcb7b024fd update libxev to fix CPU issue on macos 2023-09-01 08:23:38 -07:00
Mitchell Hashimoto
44fdcc4948 Merge pull request #370 from mitchellh/random-crash
Multiple fixes to bugs found while reading random bytes
2023-08-31 21:25:32 -07:00
Mitchell Hashimoto
3bd77259bf font: don't use intCast on index
This is a weird one. By using intCast on the `idx` I am periodically
getting a panic on index out of bounds where the index is larger than
FontIndex can possibly be. Very strange!

I tried to just remove intCasts and believe it or not that worked.
Previously, `cat /dev/urandom` would trigger the issue in seconds and
now I've had it running 20+ minutes without the issue.

The additional `if` check is just a safety mechanism
2023-08-31 21:16:56 -07:00
Mitchell Hashimoto
36756cc866 terminal: charset table should be len 256, not 255 2023-08-31 20:45:13 -07:00
Mitchell Hashimoto
f4fef559fb terminal: delete lines outside of scroll region should do nothing 2023-08-31 20:41:32 -07:00
Mitchell Hashimoto
65246327dd terminal: add more assertions 2023-08-31 19:45:22 -07:00
Mitchell Hashimoto
6c13627d51 terminal: delete chars (CSI P) tested, fixes many issues 2023-08-31 19:42:23 -07:00
Mitchell Hashimoto
0aebf1e406 terminal: CSI S allows for count greater than scroll region height 2023-08-31 17:52:22 -07:00
Mitchell Hashimoto
d05381db83 remove some unreachables, log errors to avoid crashes
These are still TODO but we don't want to crash on bad input.
2023-08-31 14:55:27 -07:00
Mitchell Hashimoto
2d6fae0466 Merge pull request #369 from mitchellh/kitty-page-up
input: kitty keymap was missing page up/down
2023-08-31 14:36:01 -07:00
Mitchell Hashimoto
67bc9f59ed input: kitty keymap was missing page up/down 2023-08-31 14:32:42 -07:00
Mitchell Hashimoto
369ffebb72 input: when overwriting a binding, we must update the reverse map 2023-08-31 13:08:33 -07:00
Mitchell Hashimoto
60f8eca12d Merge pull request #368 from mitchellh/macos-sync
macos: sync keybindings with Mac menu items
2023-08-31 12:53:46 -07:00
Mitchell Hashimoto
fe5da86bb0 input: maintain a reverse mapping to quickly look up trigger by action 2023-08-31 12:45:43 -07:00
Mitchell Hashimoto
b7508cdc66 macos: setup delegate for app state, config reload callback 2023-08-31 11:56:15 -07:00
Mitchell Hashimoto
10aaf8bd35 macos: sync all remaining menu items 2023-08-31 11:44:43 -07:00
Mitchell Hashimoto
76053460d5 macos: sync File menu 2023-08-31 11:40:21 -07:00
Mitchell Hashimoto
22b925223a macos: sync many more menu items 2023-08-31 11:33:58 -07:00
Mitchell Hashimoto
c43c3741d9 Merge pull request #365 from mitchellh/goonz/fix-zomby-subprocesses
termio/exec: don't leak zombie subprocesses
2023-08-31 11:17:01 -07:00
Mitchell Hashimoto
c7071a1da2 macos: complete lookup table for key equivalents 2023-08-31 11:14:07 -07:00
Will Pragnell
2e54ad2cce command: only spin on waitpid if it's non-blocking 2023-08-31 07:51:50 -07:00
Mitchell Hashimoto
52396304ff macos: begin syncing menuitem key equivalents 2023-08-30 22:45:29 -07:00
Mitchell Hashimoto
ba883ce39a add ghostty_config_trigger C API to find a trigger for an action 2023-08-30 22:14:44 -07:00
Mitchell Hashimoto
c71979804e apprt/embedded: ghostty_surface_binding_action can now run any action 2023-08-30 21:46:38 -07:00
Mitchell Hashimoto
17e46bf0f4 input: move action parsing to dedicating Action.parse 2023-08-30 21:39:25 -07:00
Will Pragnell
aa9e12dac2 termio/exec: don't leak zombie subprocesses 2023-08-30 21:37:38 -07:00
Mitchell Hashimoto
3352cae3f7 terminal: resize more cols no longer preserves trailing stylized cells 2023-08-30 15:55:43 -07:00
Mitchell Hashimoto
982da61ed2 Merge pull request #363 from mitchellh/fix-sgr
terminal: sgr parsing doesn't parse 4-form 48, allows unstyled underline
2023-08-30 15:06:49 -07:00
Mitchell Hashimoto
c18527384e terminal: sgr parsing doesn't parse 4-form 48, allows unstyled underline
Fixes #362

We previously tried to parse 4-form 48, but as far as I can tell this is
never used anyways and in this real world scenario it expected us to
parse a 3-form followed by an underline. This fixes the real world
scenario as priority and adds a test.

This also fixes an issue where single form colon underline may actually
exist, again from a real world scenario.
2023-08-30 14:58:44 -07:00
Mitchell Hashimoto
fb2d4faa03 terminal: add contrast function based on w3c 2023-08-30 10:18:18 -07:00