Skip to content

Improve query editor execution and autocomplete input - #305

Merged
Maxteabag merged 1 commit into
mainfrom
fix/issue-299-input-and-tabs
Aug 23, 2026
Merged

Improve query editor execution and autocomplete input#305
Maxteabag merged 1 commit into
mainfrom
fix/issue-299-input-and-tabs

Conversation

@Maxteabag

@Maxteabag Maxteabag commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • forward configured query-insert actions before TextArea consumes editing keys
  • preserve Enter/newline by default, but accept autocomplete without a newline when the user explicitly binds autocomplete_accept to Enter
  • make autocomplete rows clickable and apply the clicked suggestion
  • retain the existing Tab autocomplete behavior and Ctrl+Enter execution binding

Why

GNOME Terminal on Pop!_OS 22 uses the legacy terminal keyboard encoding where Ctrl+Enter and Enter are both sent as carriage return (^M). Sqlit cannot recover a modifier the terminal does not transmit. This PR does not add another execution shortcut; it instead ensures configured insert-mode actions are routed correctly on terminals that can report them.

Autocomplete handling is binding-aware: the default remains Tab and ordinary Enter remains a newline, while an explicit Enter autocomplete binding works as configured.

Partially addresses #299. Query tabs are deliberately excluded because they are separate product/lifecycle scope.

Validation

  • focused keyboard/mouse tests: 23 passed
  • full unit/UI suite before the final binding-specific adjustment: 1,416 passed, 2 skipped
  • real Textual pilot.press() coverage for Ctrl+Enter, Enter, and Tab
  • real Textual pilot.click() coverage for choosing a suggestion
  • Ruff and structured autoreview: clean

@Maxteabag
Maxteabag force-pushed the fix/issue-299-input-and-tabs branch from d082565 to f0846fe Compare August 23, 2026 15:32
@Maxteabag
Maxteabag merged commit 395f58b into main Aug 23, 2026
21 checks passed
@Maxteabag
Maxteabag deleted the fix/issue-299-input-and-tabs branch August 23, 2026 15:54
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