2mol / 2mol/pboy

"New filename" input doesn't handle Home/End keys

Offen
#29 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Haskell
Sterne
744
Forks
22
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

One can't jump to the beginning/end of the filename input with the Home/End keys.
According to its [documentation](http://hackage.haskell.org/package/brick-0.47/docs/Brick-Widgets-Edit.html#t:Editor), the Bricks Editor only supports Ctrl+A/Ctrl+E for that.

We could manually register an event handler and match on EvKey events with KHome/KEnd, but I'm not sure if/how it's possible to change the cursor position in the editor…

I'll just leave this here as a reference for anyone who encounters the same behaviour; it doesn't necessarily need to be "fixed". :)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

The issue is in the 'New filename' input, which uses the Brick Editor widget. Look at the Brick documentation for the Editor type and its event handling. Find where the input field is created and events are processed, likely in a UI event loop. Investigate how to register a custom event handler for KHome and KEnd keys and how to programmatically set the cursor position in the editor.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
haskell
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.