Skip to content

Commit a6c91ee

Browse files
committed
fix(app): use key const
1 parent 1ac4ad1 commit a6c91ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/view/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ func (a *App) helpCmd(evt *tcell.EventKey) *tcell.EventKey {
695695

696696
// previousView returns to the view prior to the current one in the history
697697
func (a *App) previousView(evt *tcell.EventKey) *tcell.EventKey {
698-
if evt != nil && evt.Rune() == 'b' && a.Prompt().InCmdMode() {
698+
if evt != nil && evt.Rune() == rune(ui.KeyB) && a.Prompt().InCmdMode() {
699699
return evt
700700
}
701701
cmds := a.cmdHistory.List()
@@ -717,7 +717,7 @@ func (a *App) previousView(evt *tcell.EventKey) *tcell.EventKey {
717717

718718
// lastView switches between the last view and this one a la `cd -`
719719
func (a *App) lastView(evt *tcell.EventKey) *tcell.EventKey {
720-
if evt != nil && evt.Rune() == '-' && a.Prompt().InCmdMode() {
720+
if evt != nil && evt.Rune() == ui.KeyDash && a.Prompt().InCmdMode() {
721721
return evt
722722
}
723723
cmds := a.cmdHistory.List()

0 commit comments

Comments
 (0)