Ghostty nightly now supports the `click_events` extension introduced by Kitty and supported by Fish. If you're using Fish 4.1+, you can click (no modifiers!) anywhere at a prompt to move the mouse. I believe Ghostty is the first to support this extension outside of Kitty.

As far as as I can find, the only shell to support this is Fish (4.1+) and the only terminal to support this previously is Kitty. It'd be great for more of both ecosystems to support this.

Other terminals do support moving the cursor with the mouse to some extent (Ghostty included since 1.0), but do so by another, more fragile mechanism: when you click, it just best-effort calculates a number of synthetic left arrow key inputs to pretend to move your cursor. This is super fragile because it can't take into account shell behaviors particularly around indention, multi-line, and if you're not at a prompt at all...

The `click_events` extension allows Ghostty to know when you're at a prompt line, and works by encoding a mouse click event while at a prompt line to the shell. The shell then takes over and handles all the logic of moving the cursor, which makes the most sense!

PR: github.com/ghostty-org/ghostty

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/mitchellh/statuses/116002606293575135 on your instance and quote it. (Note that quoting is not supported in Mastodon.)