[PR #3095] CB-5506 support directional selections #3847

Closed
opened 2026-03-07 21:15:37 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/dbeaver/cloudbeaver/pull/3095

State: closed
Merged: Yes


The current implementation relies on from and to to represent the selection range in the editor. While this approach works for simple scenarios, it lacks the ability to properly handle selection direction and advanced cursor behavior. For example:

  • Directional Selections: When a user selects text in reverse (e.g., moving left while holding shift), from and to fail to retain which side of the selection the cursor (caret) is on.
  • Selection Extension: Keyboard shortcuts like cmd + shift + left require precise tracking of the fixed start (anchor) and current cursor position (head) to extend the selection correctly.
**Original Pull Request:** https://github.com/dbeaver/cloudbeaver/pull/3095 **State:** closed **Merged:** Yes --- The current implementation relies on `from` and `to` to represent the selection range in the editor. While this approach works for simple scenarios, it lacks the ability to properly handle **selection direction** and advanced cursor behavior. For example: - **Directional Selections**: When a user selects text in reverse (e.g., moving left while holding `shift`), `from` and `to` fail to retain which side of the selection the cursor (caret) is on. - **Selection Extension**: Keyboard shortcuts like `cmd + shift + left` require precise tracking of the **fixed start** (`anchor`) and **current cursor position** (`head`) to extend the selection correctly.
kerem 2026-03-07 21:15:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#3847
No description provided.