Skip to content

Commit 1d8b5e4

Browse files
committed
fix(prompts): selected prompt resets after editing custom prompt
Closes #131
1 parent c8a45d5 commit 1d8b5e4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
7+
- Selected prompt resets after editing custom prompt.
8+
59
## [1.5.1] - 2024-01-27
610

711
### Fixed

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/AppSettingsConfigurable.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,13 @@ class AppSettingsConfigurable : BoundConfigurable(message("settings.general.grou
163163
}
164164
.setEditAction {
165165
promptTable.editPrompt()?.let {
166+
val editingSelected = promptComboBox.component.selectedItem == it.first
166167
promptComboBox.component.removeItem(it.first)
167168
promptComboBox.component.addItem(it.second)
169+
170+
if (editingSelected) {
171+
promptComboBox.component.selectedItem = it.second
172+
}
168173
}
169174
}
170175
.setEditActionUpdater {

0 commit comments

Comments
 (0)