3555 Commits

Author SHA1 Message Date
Mitchell Hashimoto
7be5eba9cb input: unit tests for pasing tuples 2023-11-06 09:23:24 -08:00
Mitchell Hashimoto
1ff81682f7 input: add format support for tuple args 2023-11-06 09:19:59 -08:00
Mitchell Hashimoto
bc0d1a9255 macos: remove focused cell size resize increment setter 2023-11-06 09:11:50 -08:00
Mitchell Hashimoto
1ff0573518 macos: use normal swiftui parameters for resizable publisher/inc 2023-11-06 09:06:20 -08:00
Gregory Anders
582df33083 macos: use Ghostty.AppState as @EnvironmentObject
This is a small cleanup change. This provides the Ghostty.AppState
object to any view that needs it within the TerminalSplit view hierarchy
without needing to explicitly define EnvironmentKeys.
2023-11-05 20:42:59 -06:00
Gregory Anders
9b14398153 macos: support resizing splits 2023-11-05 20:42:59 -06:00
Gregory Anders
0a2d435481 core: add resize_split binding with default keys
On macOS, use Cmd+Ctrl+Arrow keys as default bindings for resizing by 10
points in the given direction.
2023-11-05 20:20:39 -06:00
Gregory Anders
e7745dc820 core: add support for bindings with multiple parameters
This commit adds support for bindings with multiple parameters. For
example, a "resize_split" binding will have two parameters: the resize
direction and the resize amount. Multiple parameters are supported by
using a tuple as the enum value and are written in string form by
separating each argument with a comma. Example: "resize_split:up,10".
2023-11-05 20:20:39 -06:00
Gregory Anders
3b2799ce97 macos: refactor SplitNode
This commit does two things: adds a weak reference to the parent
container of each SplitNode.Container and SplitNode.Leaf and moves the
"direction" of a split out of the SplitNode enum and into the
SplitNode.Container struct as a field.

Both changes are required for supporting split resizing. A reference to
the parent in each leaf and split container is needed in order to
traverse upwards through the split tree. If the focused split is not
part of a container that is split along the direction that was requested
to be resized, then we instead try and resize the parent. If the parent
is split along the requested direction, then it is resized
appropriately; otherwise, repeat until the root of the tree is reached.

The direction is needed inside the SplitNode.Container object itself so
that the container knows whether or not it is able to resize itself in
the direction requested by the user. Once the split direction was moved
inside of SplitNode.Container, it became redundant to also have it as
part of the SplitNode enum, so this simplifies things.
2023-11-05 20:20:39 -06:00
Mitchell Hashimoto
e77a7e2dcd Merge pull request #821 from gpanders/macos-split-close-fixup
macos: set id on nested terminal splits
2023-11-05 17:43:02 -08:00
Gregory Anders
f614d45e28 macos: set id on nested terminal splits
This fixes https://github.com/mitchellh/ghostty/issues/761 for terminal
splits that are not at the root.
2023-11-05 19:37:20 -06:00
Mitchell Hashimoto
04ef21653f config: on macOS cmd+ctrl+f toggles fullscreen by default
Fixes #171
2023-11-05 11:40:58 -08:00
Mitchell Hashimoto
7cb8f1e115 Merge pull request #819 from mitchellh/init-wd
termio: initialize pwd before subprocess starts
2023-11-05 11:24:43 -08:00
Mitchell Hashimoto
f705fe6cf2 termio: initialize pwd before subprocess starts
Fixes #807
2023-11-05 11:23:14 -08:00
Mitchell Hashimoto
a1f3181f32 Merge pull request #818 from mitchellh/macos-paste-protect
macos: paste protection
2023-11-05 09:32:46 -08:00
Mitchell Hashimoto
5de8efcccc macos: comment the new views 2023-11-05 09:31:12 -08:00
Mitchell Hashimoto
705f3b52c7 config: add clipboard-paste-bracketed-safe 2023-11-05 09:25:06 -08:00
Mitchell Hashimoto
f521b0cb99 core: not unsafe on bracketed 2023-11-05 09:20:27 -08:00
Mitchell Hashimoto
ef44551522 apprt/embedded: hook up paste confirmation 2023-11-05 09:20:16 -08:00
Mitchell Hashimoto
5dac8fba96 macos: paste protection text should be selectable 2023-11-04 20:48:18 -07:00
Mitchell Hashimoto
04acaf8b20 macos: hook up paste protection delegate, cancel button 2023-11-04 20:47:16 -07:00
Mitchell Hashimoto
5f5f5a44ec macos: paste protection boilerplate 2023-11-04 20:15:39 -07:00
Mitchell Hashimoto
3e26a2f506 Merge pull request #815 from mitchellh/update-zig
update zig
2023-11-04 17:23:39 -07:00
Mitchell Hashimoto
1b7786a3e3 update zig 2023-11-04 17:04:24 -07:00
Mitchell Hashimoto
ebd57f6bbc apprt/gtk: correct new tab button click function signature
Fixes #674

We were incorrectly reusing the action activate signal callback for the
button click. These have different function signatures.
2023-11-04 16:57:01 -07:00
Mitchell Hashimoto
06a469fc4b core: do not consider bracketed pastes unsafe 2023-11-04 12:08:34 -07:00
Mitchell Hashimoto
85d4a9a572 Merge pull request #812 from mitchellh/feature/clipboard-safety
GTK Feature: Clipboard Safety
2023-11-04 11:28:55 -07:00
Mitchell Hashimoto
43e1c9f147 apprt/gtk: tweak unsafe paste window 2023-11-04 11:27:39 -07:00
Mitchell Hashimoto
254365afab terminal: add sanitize.zig 2023-11-04 11:25:02 -07:00
Mitchell Hashimoto
ab9a9b6eb1 apprt/gtk: copy change for unsafe paste window 2023-11-04 11:24:48 -07:00
Mitchell Hashimoto
a38220eade terminal: move sanitization check to this package, unit test 2023-11-04 11:19:25 -07:00
David Rubin
65c9ba0a86 add todos + make sure non-implimented platforms still work. 2023-11-04 00:50:26 -07:00
Mitchell Hashimoto
cc8c6c78ef Merge pull request #811 from mitchellh/ct-score-style
font/coretext: discovery scoring should take into account symb. traits
2023-11-03 22:35:00 -07:00
Mitchell Hashimoto
cb684e35cc font/coretext: discovery scoring should take into account symb. traits
Fixes #707

Our scoring algorithm previously did not take into account symbolic
traits, so when `bold = false and italic = false`, regular, bold, italic
would all be equally likely to appear first.

This modifies our scoring algorithm to prioritize matching symbolic
traits. Further, we have a special case for no symbolic traits to
prioritize "Regular" named styles. We can expand this to other styles
too but we do not do this here.

We also modified the algorithm to always prefer fonts with more glyphs
over fonts with less, hopeful that we can load fewer fonts for other
glyphs later.
2023-11-03 22:21:34 -07:00
Mitchell Hashimoto
05e73ace36 Merge pull request #789 from Raiden1411/main
feat(actions): add new `list-keybinds` action
2023-11-03 17:55:59 -07:00
Mitchell Hashimoto
e73d3db497 cli/list-keybindings: stylistic changes 2023-11-03 17:51:34 -07:00
Mitchell Hashimoto
debeba99db input: Binding.Trigger format 2023-11-03 17:48:19 -07:00
Mitchell Hashimoto
cb4bb8aaf6 input: add Binding.Action.format to convert action to string 2023-11-03 15:57:14 -07:00
David Rubin
a578ec342f forgot to update other backends 2023-11-03 14:20:24 -07:00
Mitchell Hashimoto
9e7493c4d4 Merge pull request #806 from dvorakluk/fix/balanced-pointToViewport
fix: posToViewPort when balanced padding enabled
2023-11-03 14:15:13 -07:00
xdBronch
205b27dc80 remove deps that were already provided by other packages (#797) 2023-11-03 14:04:00 -07:00
David Rubin
6e575d9035 configs added 2023-11-03 13:20:26 -07:00
David Rubin
44073e4c98 add basic functionality 2023-11-03 10:58:56 -07:00
Lukáš Dvořák
8774a73302 update comment 2023-11-03 18:30:42 +01:00
Lukáš Dvořák
5224b6157c fix: posToViewPort when using balanced padding enabled 2023-11-03 18:28:34 +01:00
Mitchell Hashimoto
3eb91b8f00 Merge pull request #804 from mitchellh/macos-demini
macos: deminiaturize on new tab
2023-11-03 09:37:29 -07:00
Mitchell Hashimoto
3bef50f0cf macos: deminiaturize on new tab 2023-11-03 09:35:14 -07:00
Mitchell Hashimoto
f3a4c754c2 Merge pull request #803 from mitchellh/more-macos
More macos fixes
2023-11-03 09:18:08 -07:00
Mitchell Hashimoto
cad461fff7 macos: modify tabbing mode when entering/exiting fullscreen
Related to #799

With tabbing mode disabled, fullscreen (native) windows when creating a
new tab creates a window in the tab bar, but ALSO puts the window into a
new "screen" on macOS. When you click the tab bar, macOS animates
between screens. Its jarring!

This commit makes it so that in fullscreen we go back to automatic
tabbing even for new windows, which produces new windows within a tab.
This is normal default behavior for macOS tabbed programs. When you are
not in fullscreen or exit fullscreen, then the tabbing mode returns to
disabled so Ghostty can manage it.
2023-11-03 09:16:55 -07:00
Mitchell Hashimoto
c6ce9aea4a macos: do not set window initial size if fullscreen
Fixes #798
2023-11-03 09:06:17 -07:00