Skip to content

feat: click-to-position cursor and backspace-delete-selection#103

Closed
JakubKontra wants to merge 1 commit intocontember:mainfrom
JakubKontra:feat/click-to-cursor-and-selection-delete
Closed

feat: click-to-position cursor and backspace-delete-selection#103
JakubKontra wants to merge 1 commit intocontember:mainfrom
JakubKontra:feat/click-to-cursor-and-selection-delete

Conversation

@JakubKontra
Copy link
Copy Markdown
Contributor

@JakubKontra JakubKontra commented Apr 11, 2026

Hello guys, awesome piece of sofware, thanks!

The only thing I’m missing is the ability to click in the terminal and be able to delete a specific part and possibly move the cursor within the command wherever I need.

It should only work in the main process and not in subprocesses (eq. claudecode, vim... etc)

Add Warp-style terminal interaction features:

- Click on the shell prompt line to move the cursor to that position
  by sending the appropriate number of arrow key escape sequences
- Select text in the prompt and press Backspace to delete the selection
  by moving cursor to the end and sending backspace characters

Both features are guarded to only activate in a plain shell prompt:
- Disabled when a child process is running (vim, less, claude CLI, etc.)
- Disabled in mouse mode (tmux) or alternate screen (TUI apps)
- Click-to-cursor only on the cursor's row, single click without drag
- Backspace-delete only for single-row selections on cursor's row
- Wide characters (CJK, emoji) handled correctly
@matej21
Copy link
Copy Markdown
Member

matej21 commented Apr 14, 2026

Hey @JakubKontra, thanks a ton for this PR and the kind words! 🙏

I cherry-picked it into main as fee8658 and then layered a few follow-up fixes on top — closing this one since it's now merged (just not via the GitHub "merge" button, so it shows as closed rather than merged). The relevant commits on main:

  • fee8658 feat: click-to-position cursor and backspace-delete-selection (your original work)
  • 7713d73 perf: refresh has_running_child on-demand instead of polling every 2s
  • c98bda4 fix: check has_running_child synchronously at click / key-down time
  • c30cca5 fix: block click-to-cursor feature when running under a session proxy
  • f66742d fix: resolve real shell pid through dtach/tmux proxies

Thanks again — really nice feature, it's been great to use day to day. ❤️

@matej21 matej21 closed this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants