We were previously retaining Options on the Surface struct, but other
than userdata, we only use those values for initialization. Instead,
store just the opaque userdata value on the Surface and clarify that
Surface.Options are only used for initialization.
Fixes#1676
The comment in the diff explains. This is a regression that was not unit
tested properly in the old implementation prior to the paged-terminal
merge.
Fixes#1677
If eraseRowBounded is called at the top of a page AND there is a tracked
pin at the top of the page, then we'd have an integer overflow. The test
case covers this and this adds a fix.
We allow titlebarFont to be nil to differentiate between "system" (nil)
and "custom" (non-nil) behavior. For the "system" case, we need to use
the system _titlebar_ font (rather than just the default system font),
to match the system's conventions.
A minor addition, but saves future folks wondering if they need to
figure out different packages on Debian in order to get Ghostty to
compile (they don't).
Key contains pointers into DerivedConfig. Each surface has its own
DerivedConfig. This would cause memory corruption if the surface that
opened the initial font grid deallocates. Instead, let's make sure Key
owns its own DerivedConfig.
Fixes#1670
This fixes two issues:
- If no font families are set, font points would not change the hash.
- DPI changes would not change the hash.
When the hash doesn't change when it should, we reuse a font stack due
to changes in #1662. This would cause some font issues. :)
Fixes#1664
I previously asserted that we got exactly one run from CoreText because
I assumed that our run iterator was perfectly splitting runs for
CoreText. This assumption appears to be false and that seems okay.
The test case in this commit produces two runs that are directly next to
each other and there's no downside to simply iterating over them. So
this commit changes to iterate over the runs.
In korean input method on macos, it should simply return empty string.
Issue was created after https://github.com/mitchellh/ghostty/pull/1659.
```
gksr<BS> # 한ㄱ<BS>
```
'ㄱ' at the end should be removed with single <BS>, but for now
it requires two <bs> to remove 'ㄱ'.