Skip to content

fix(terminal): use pointer press origin for selection start - #207

Merged
Cleboost merged 1 commit into
masterfrom
fix/selection-start-offset
Nov 26, 2026
Merged

Cleboost merged 1 commit into
masterfrom
fix/selection-start-offset

Conversation

@Cleboost

Copy link
Copy Markdown
Owner

Summary

  • Use ui.input(|i| i.pointer.press_origin()) (falling back to response.interact_pointer_pos()) when drag_started_by(PointerButton::Primary) fires, so terminal selection starts at the exact cell where the mouse button was pressed instead of 1–2 characters later after the drag threshold is crossed.
  • Immediately call terminal.update_selection with the current pointer position on the same frame.
  • Add the missing TRASH icon constant to ui::icons::regular to fix compilation in host_grid.rs.

Test plan

  • cargo check passes without errors.
  • Manual test: drag-select text starting from the left edge of a line and verify the first 1–2 characters are included in the selection.

@Cleboost
Cleboost force-pushed the fix/selection-start-offset branch from c982b2e to ab842f6 Compare November 26, 2026 18:06
@Cleboost
Cleboost merged commit 3265b4b into master Nov 26, 2026
7 checks passed
@Cleboost
Cleboost deleted the fix/selection-start-offset branch November 26, 2026 18:06
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.

1 participant