Skip to content

feat(Console): improve command history navigation#1843

Merged
pedrolamas merged 1 commit into
fluidd-core:developfrom
pedrolamas:pedrolamas/console-keyboard-history
May 15, 2026
Merged

feat(Console): improve command history navigation#1843
pedrolamas merged 1 commit into
fluidd-core:developfrom
pedrolamas:pedrolamas/console-keyboard-history

Conversation

@pedrolamas

Copy link
Copy Markdown
Member

Improve keyboard navigation on the console, allowing changing line when a multi-line entry is currently showed.

Current behavior is now to also include a blank entry on the top and on the bottom of history.

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
@pedrolamas pedrolamas added this to the 1.37.1 milestone May 15, 2026
@pedrolamas pedrolamas requested a review from Copilot May 15, 2026 21:37
@pedrolamas pedrolamas added the FR - Enhancement New feature or request label May 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the console command history navigation to support multi-line entries: arrow keys only navigate history when the cursor is on the first/last line of the textarea, and a single historyIndex replaces the previous rotating-array approach, naturally allowing blank "sentinel" entries above the newest and below the oldest history items.

Changes:

  • Replaced the history rotation + originalHistory/isFirst state with a simple historyIndex cursor over a stable history array.
  • New handleKeyUp/handleKeyDown only intercept arrow keys when the caret is on the first/last visual line (no \n before/after caret and no selection), allowing in-entry caret movement otherwise.
  • Updated the input ref type from VTextField to VTextarea to access the underlying textarea element via $refs.input.

@pedrolamas pedrolamas merged commit f14389e into fluidd-core:develop May 15, 2026
8 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/console-keyboard-history branch May 15, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FR - Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants