Skip to content

Make ESC out of filter mode strictly synchronous #27

Description

@Antoinegtir

Scope

When the user presses / and then Esc, the filter is cleared but the cursor briefly stays in filter mode before the next render. On fast key-repeat it occasionally results in a single character bleeding through to action bindings.

What to do

  • Trace through crates/fl-tui/src/runner.rs — the on_keyfilter_inputkeys_tx interaction.
  • Make ESC handling synchronous: clear filter_input AND swallow the same tick so no action fires.

Acceptance

  • Holding / + a letter + Esc never fires the bound action for that letter.
  • Unit test on the key dispatch helper covers the transition.

Hint

The two existing call sites that check state.filter_input.is_some() before/after on_key are the right place to look.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstuiInline dashboard, widgets, rendering

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions