When debugging, I see that it is annoying to select the recent command I just sent. For example, I send some commands to GDB from the panel, such as:
first, I enter "p a", then, I enter "p b", and finally I enter "p c", now if I use the UP and DOWN key, I see that the wxCombo list are:
p a -> this is selected firstly
p b
p c
This means the oldest command is selected, you have to press UP or DOWN several times to select the recent sent command.
But what I think is that the user maybe need only repeat the command he just entered.
This patch fix this issue. (If you look at the ThreadSearch's wxComboBox, you see the last search item is put in the position 0 of the wxComboBox list.
src/sdk/debuggermanager.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sdk/debuggermanager.cpp b/src/sdk/debuggermanager.cpp
index eb4be390..65da9bc4 100644
--- a/src/sdk/debuggermanager.cpp
+++ b/src/sdk/debuggermanager.cpp
@@ -621,7 +621,7 @@ public:
int index = m_command_entry->FindString(cmd);
if (index != wxNOT_FOUND)
m_command_entry->Delete(index);
- m_command_entry->Append(cmd);
+ m_command_entry->Insert(cmd, 0);
m_command_entry->SetValue(wxEmptyString);
}
OK to commit?