summaryrefslogtreecommitdiffhomepage
path: root/internal/tui/components
diff options
context:
space:
mode:
authorEd Zynda <[email protected]>2025-05-23 14:43:30 +0300
committerGitHub <[email protected]>2025-05-23 06:43:30 -0500
commitb9ebcea82c262dc834633c2c8f44a94fe8773a15 (patch)
tree96ef7e6495574ae0d248a8eafeeb667549d46bad /internal/tui/components
parentf31f92119d95b7b844a5ec0b05533c079b48a7fa (diff)
downloadopencode-b9ebcea82c262dc834633c2c8f44a94fe8773a15.tar.gz
opencode-b9ebcea82c262dc834633c2c8f44a94fe8773a15.zip
really disable history nav when completions dialog is open (#50)
Diffstat (limited to 'internal/tui/components')
-rw-r--r--internal/tui/components/chat/editor.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/tui/components/chat/editor.go b/internal/tui/components/chat/editor.go
index 212ad5529..0858e22df 100644
--- a/internal/tui/components/chat/editor.go
+++ b/internal/tui/components/chat/editor.go
@@ -247,8 +247,8 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
// Handle history navigation with up/down arrow keys
- // Only handle history navigation if the filepicker is not open
- if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryUp) && !m.app.IsFilepickerOpen() {
+ // Only handle history navigation if the filepicker is not open and completion dialog is not open
+ if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryUp) && !m.app.IsFilepickerOpen() && !m.app.IsCompletionDialogOpen() {
// Get the current line number
currentLine := m.textarea.Line()
@@ -268,7 +268,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
}
- if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryDown) && !m.app.IsFilepickerOpen() {
+ if m.textarea.Focused() && key.Matches(msg, editorMaps.HistoryDown) && !m.app.IsFilepickerOpen() && !m.app.IsCompletionDialogOpen() {
// Get the current line number and total lines
currentLine := m.textarea.Line()
value := m.textarea.Value()