mirror-ghostty/src
Mitchell Hashimoto 051e6543ff
Decouple balanced top and left window paddings to avoid diagonal resize jitter (#9518)
I had a bit of the same annoyance as #9064. I agree that with balanced
padding, you should expect horizontal jitter when resizing horizontally,
and vertical jitter when resizing vertically. Diagonal jitter, however,
happened because the top padding was upper bounded by the left padding,
coupling the vertical and horizontal wobbling. This looks kind of janky,
and it's surprising that the balance between top and bottom padding
changes as you vary only the width of the window.

With this PR, the upper bound is instead equal to the maximum left
padding. Since this only depends on the config, not the current window
width, the diagonal wobbling is avoided. Both the top and left padding
still have the same range of motion as before.

An alternative could be to bound by the minimum or median left padding
instead. Open to suggestions.

**Before**


https://github.com/user-attachments/assets/d12c5870-f05d-450f-89fc-c59eab90e199

**After**


https://github.com/user-attachments/assets/35b80bb0-9ea2-41c1-8502-3a8eec51dbc6
2025-12-15 12:11:04 -08:00
..
apprt logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
benchmark Remove unused imports 2025-11-27 13:37:53 -08:00
build logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
cli logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
config config: macos blur settings enable blur on non-Mac 2025-12-15 11:00:53 -08:00
crash Zig 0.15: zig build test macOS 2025-10-03 07:10:43 -07:00
datastruct Remove unused imports 2025-11-27 13:37:53 -08:00
extra Remove unused imports 2025-11-27 13:37:53 -08:00
font Remove unused imports 2025-11-27 13:37:53 -08:00
input Wrong action typo fix 2025-12-13 13:45:45 -08:00
inspector Remove unused imports 2025-11-27 13:37:53 -08:00
lib Remove unused imports 2025-11-27 13:37:53 -08:00
os os/shell: introduce ShellCommandBuilder 2025-12-12 08:59:44 -05:00
renderer Decouple balanced top and left window paddings to avoid diagonal resize jitter (#9518) 2025-12-15 12:11:04 -08:00
shell-integration zsh: document unsupported system-level ZDOTDIR 2025-12-14 20:24:41 -05:00
simd Remove unused imports 2025-11-27 13:37:53 -08:00
stb Fix typos 2025-10-03 18:52:26 +02:00
synthetic synthetic: make bytes generation more flexible 2025-11-20 08:29:36 -06:00
terminal terminal: CSI S compatiblity improvements 2025-12-14 14:36:42 -08:00
terminfo ci: cleanup 2025-10-03 07:10:43 -07:00
termio terminal: CSI S compatiblity improvements 2025-12-14 14:36:42 -08:00
unicode unicode: don't narrow invalid text presentation (VS15) sequences 2025-11-23 22:39:21 -05:00
App.zig Remove unused imports 2025-11-27 13:37:53 -08:00
Command.zig Zig 0.15: zig build test 2025-10-03 07:10:43 -07:00
Surface.zig logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
apprt.zig Remove unused imports 2025-11-27 13:37:53 -08:00
build_config.zig Remove unused imports 2025-11-27 13:37:53 -08:00
cli.zig cli: make the action parser (+foo) generic and reusable 2025-07-09 15:06:24 -07:00
config.zig Add `.ghostty` extension to `config` (#8885) 2025-10-12 13:48:06 -07:00
fastmem.zig perf: replace `std.debug.assert` with inlined version 2025-11-17 12:13:56 -07:00
file_type.zig util: introduce helper for detecting file types 2025-06-25 16:27:23 -04:00
global.zig logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
helpgen.zig Zig 0.15: zig build test 2025-10-03 07:10:43 -07:00
input.zig input: use std.Io.Writer for key encoder, new API, expose via libghostty 2025-10-04 20:19:39 -07:00
lib_vt.zig terminal: highlights 2025-11-24 19:55:27 -08:00
main.zig remove src/bench 2025-07-09 15:06:24 -07:00
main_bench.zig Remove unused imports 2025-11-27 13:37:53 -08:00
main_build_data.zig flush output for our builddata executable 2025-10-03 13:32:15 -07:00
main_c.zig perf: replace `std.debug.assert` with inlined version 2025-11-17 12:13:56 -07:00
main_gen.zig Remove unused imports 2025-11-27 13:37:53 -08:00
main_ghostty.zig logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
main_wasm.zig
math.zig
pty.zig Zig 0.15: zig build GTK exe 2025-10-03 07:10:43 -07:00
quirks.zig quirks: remove type signature for inlineAssert 2025-12-08 13:19:16 +08:00
renderer.zig Remove unused imports 2025-11-27 13:37:53 -08:00
surface_mouse.zig Remove unused imports 2025-11-27 13:37:53 -08:00
termio.zig search thread needs to take an allocated needle 2025-11-26 08:50:04 -08:00