Skip to content

macos: long press cmd+t doesn't focus on the latest created tab #13725

Description

@bo2themax

Discussed in #12864

Originally posted by nikitml May 30, 2026

Issue Description

ghossty.cmd+t.mov

On both 1.3.1 and the nightly (build=16276) (empty config) long pressing cmd+t creates lots of tabs BUT the focus is randomly set on tabs 3-4-5, rather than the last one

Expected Behavior

Like in any other app. In the video I tested with Terminal.app, but the same behavior sustains everywhere - Safari, Sublime, ...

Actual Behavior

It randomly focuses on 3rd or 4th or 5th tab no matter how many tabs are opened

Reproduction Steps

  1. Open ghostty
  2. Long press cmd+t to open new tab
  3. Release cmd+t

Ghostty Logs

Filtering the log data using "subsystem == "com.mitchellh.ghostty""
Timestamp                       Thread     Type        Activity             PID    TTL
2026-05-30 19:49:03.913253+0200 0x6c3f81   Info        0xbb7f54             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:03.913574+0200 0x6c3f81   Info        0xbb7f54             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:03.927932+0200 0x6c8323   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98095
2026-05-30 19:49:04.395519+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:04.410505+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:06.010594+0200 0x6c3f81   Info        0xbb8036             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.010890+0200 0x6c3f81   Info        0xbb8036             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.023497+0200 0x6c835f   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98109
2026-05-30 19:49:06.266088+0200 0x6c3f81   Info        0xbb80b0             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.266185+0200 0x6c3f81   Info        0xbb80b0             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.273012+0200 0x6c8380   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98118
2026-05-30 19:49:06.345233+0200 0x6c3f81   Info        0xbb80b5             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.345289+0200 0x6c3f81   Info        0xbb80b5             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.350853+0200 0x6c8397   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98123
2026-05-30 19:49:06.425942+0200 0x6c3f81   Info        0xbb80ba             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.425997+0200 0x6c3f81   Info        0xbb80ba             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.431159+0200 0x6c83b8   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98136
2026-05-30 19:49:06.499723+0200 0x6c3f81   Info        0xbb80bf             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.499787+0200 0x6c3f81   Info        0xbb80bf             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.505067+0200 0x6c83d4   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98145
2026-05-30 19:49:06.573706+0200 0x6c3f81   Info        0xbb8194             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.573765+0200 0x6c3f81   Info        0xbb8194             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.579776+0200 0x6c83ee   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98152
2026-05-30 19:49:06.670159+0200 0x6c3f81   Info        0xbb819b             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.670225+0200 0x6c3f81   Info        0xbb819b             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.675623+0200 0x6c8414   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98165
2026-05-30 19:49:06.744114+0200 0x6c3f81   Info        0xbb8270             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.744180+0200 0x6c3f81   Info        0xbb8270             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.750099+0200 0x6c842a   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98170
2026-05-30 19:49:06.826134+0200 0x6c3f81   Info        0xbb8275             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.826197+0200 0x6c3f81   Info        0xbb8275             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.831227+0200 0x6c844b   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98183
2026-05-30 19:49:06.912144+0200 0x6c3f81   Info        0xbb827b             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:06.912208+0200 0x6c3f81   Info        0xbb827b             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:06.918135+0200 0x6c8467   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98192
2026-05-30 19:49:07.303873+0200 0x6c3f81   Info        0xbb8360             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: found Ghostty resources dir: /Applications/Ghostty.app/Contents/Resources/ghostty
2026-05-30 19:49:07.303949+0200 0x6c3f81   Info        0xbb8360             96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: shell integration automatically injected shell=.zsh
2026-05-30 19:49:07.310905+0200 0x6c8483   Info        0x0                  96031  0    ghostty: [com.mitchellh.ghostty:io_exec] io_exec: started subcommand path=/usr/bin/login pid=98201
2026-05-30 19:49:07.350322+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:07.369768+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:07.380279+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:07.764792+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:07.784022+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2
2026-05-30 19:49:07.794990+0200 0x6ac71c   Info        0x0                  67232  0    cmux: [com.mitchellh.ghostty:generic_renderer] generic_renderer: updating display link display id=2


### Ghostty Version

```text
Ghostty 1.3.2-main-+90175950d

Version
  - version: 1.3.2-main-+90175950d
  - channel: tip
Build Config
  - Zig version   : 0.15.2
  - build mode    : .ReleaseFast
  - app runtime   : .none
  - font engine   : .coretext
  - renderer      : renderer.generic.Renderer(renderer.Metal)
  - libxev        : kqueue

OS Version Information

macos 26.5 (25F71)

(Linux only) Display Server

None

(Linux only) Desktop Environment/Window Manager

No response

Minimal Ghostty Configuration

(empty)

Additional Relevant Configuration

No response

I acknowledge that:

  • I have reviewed the FAQ and confirm that my issue is NOT among them.
  • I have searched the Ghostty repository (both open and closed Discussions and Issues) and confirm this is not a duplicate of an existing issue or discussion.
  • I have checked the "Preview" tab on all text fields to ensure that everything looks right, and have wrapped all configuration and code in code blocks with a group of three backticks (```) on separate lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions