Move the el_source() call after the section of code which sets up the default "ctrl-r" and "ctrl-w" bindings
so that user-provided .editrc has a chance to override the lldb's default key bindings.
llvm-svn: 156314
diff --git a/lldb/tools/driver/IOChannel.cpp b/lldb/tools/driver/IOChannel.cpp
index 1d19994..f14e1b2 100644
--- a/lldb/tools/driver/IOChannel.cpp
+++ b/lldb/tools/driver/IOChannel.cpp
@@ -188,9 +188,6 @@
::el_set (m_edit_line, EL_EDITOR, "emacs");
::el_set (m_edit_line, EL_HIST, history, m_history);
- // Source $PWD/.editrc then $HOME/.editrc
- ::el_source (m_edit_line, NULL);
-
el_set (m_edit_line, EL_ADDFN, "lldb_complete",
"LLDB completion function",
IOChannel::ElCompletionFn);
@@ -199,6 +196,9 @@
el_set (m_edit_line, EL_BIND, "^w", "ed-delete-prev-word", NULL); // Delete previous word, behave like bash does.
el_set (m_edit_line, EL_CLIENTDATA, this);
+ // Source $PWD/.editrc then $HOME/.editrc
+ ::el_source (m_edit_line, NULL);
+
assert (m_history);
::history (m_history, &m_history_event, H_SETSIZE, 800);
::history (m_history, &m_history_event, H_SETUNIQUE, 1);