Skip to content

Create branch for append query #143

@Mrthnx

Description

@Mrthnx

Create branch for append query

What changes

  • History now allows you to add a query to the end of the editor without replacing the existing one.
  • The history modal adds a shortcut a for Append and keeps Enter for Select.

How to use it

  1. Open history (in NORMAL mode with backspace).
  2. Select a query.
  3. Press a to add it to the end of the editor.

Technical details

  • An append action has been added to the history modal and is exposed in the shortcuts.
  • _append_history_query has been added to the history handler, which:
    • Trims trailing line breaks from the current text.
    • Inserts the selected query at the end.
    • Moves the cursor to the end and maintains focus.
  • Telescope also supports append.

Modified files

  • sqlit/domains/query/ui/screens/query_history.py
  • sqlit/domains/query/ui/mixins/query_execution.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions