diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-02 17:38:27 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-07 16:02:14 -0500 |
| commit | 035344054768562bee7db12e02e3bec1c8409210 (patch) | |
| tree | 8e1c116daa1f3db6ff242b532c9ad87439f57fed /client/ui.go | |
| parent | 5a9d7f9db6212260dd18a45d6279d1377daa5857 (diff) | |
window history
Diffstat (limited to 'client/ui.go')
| -rw-r--r-- | client/ui.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/client/ui.go b/client/ui.go index f3a79c6..014c7e9 100644 --- a/client/ui.go +++ b/client/ui.go @@ -22,11 +22,15 @@ func (a *application) pushPrompt(p window.Prompt) { func (a *application) removePrompt(p window.Prompt) { for i := len(a.prompts) - 1; i >= 0; i-- { + if p != a.prompts[i] { + continue + } if i < len(a.prompts) - 1 { a.prompts = append(a.prompts[:i], a.prompts[i + 1:]...) } else { a.prompts = a.prompts[:i] } + break } } @@ -63,8 +67,12 @@ func (a *application) onInput(ev tui.Event) { input.SetText("") } } + case 'p' | keys.Ctrl: + a.traverseHistory(-1) + case 'n' | keys.Ctrl: + a.traverseHistory(1) case '0' | keys.Alt: - a.currentWindow = cmdWindowLocation {} + a.goTo(cmdWindowLocation{}) } } |
