Patch #3154 2011-05-10 12:32

codeman

gdb command combo: upkey used to go back through history
Download
3154-gdb_command_co.patch (778 bytes)
Category
Application::Refinement
Status
Accepted
Close date
2011-05-14 01:19
Assigned to
tpetrov
Index: debuggergdb.cpp
===================================================================
--- debuggergdb.cpp    (revision 7131)
+++ debuggergdb.cpp    (working copy)
@@ -315,8 +315,12 @@
         {
             m_debugger_state.GetDriver()->QueueCommand(new DebuggerCmd(m_debugger_state.GetDriver(), cmd, true));
 
-            if (m_command_entry->FindString(cmd) == wxNOT_FOUND)
-                m_command_entry->Insert(cmd, 0);
+            //If it already exists in the list, remove it and add it back at the end
+            int index = m_command_entry->FindString(cmd);
+            if (index != wxNOT_FOUND)
+                m_command_entry->Delete(index);
+            m_command_entry->Append(cmd);
+
             m_command_entry->SetValue(wxEmptyString);
         }
     }
tpetrov 2011-05-14 01:19

In svn (debuggers branch), thank you