Disable Editline on Windows.
Editline does not work correctly on Windows. This goes back at
least to r208369, and as a result r210105 was submitted to disable
libedit at runtime on Windows.
More recently, r222163 was submitted which re-writes editline
entirely, but makes the situation even worse on Windows, to the
point that it doesn't even compile. While it would be easy to
fix the compilation failure, this patch simply stops compiling
Editline entirely on Windows, as the simple compilation fix would
still result in a broken use of select on Windows, and as such a
broken implementation of Editline.
Since Editline was already disabled to begin with on Windows, we
don't attempt to fix the compilation failure or the underlying
issues, and instead just disable it "even more".
llvm-svn: 222177
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index bf3815b..21ba965 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -387,12 +387,7 @@
#ifndef LLDB_DISABLE_LIBEDIT
bool use_editline = false;
-#ifndef _MSC_VER
use_editline = m_input_sp->GetFile().GetIsRealTerminal();
-#else
- // Editline is causing issues on Windows, so use the fallback.
- use_editline = false;
-#endif
if (use_editline)
{
@@ -620,9 +615,11 @@
m_continuation_prompt = p;
else
m_continuation_prompt.clear();
-
+
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
m_editline_ap->SetContinuationPrompt (m_continuation_prompt.empty() ? NULL : m_continuation_prompt.c_str());
+#endif
}
@@ -635,7 +632,7 @@
uint32_t
IOHandlerEditline::GetCurrentLineIndex () const
{
-#ifdef LLDB_DISABLE_LIBEDIT
+#ifndef LLDB_DISABLE_LIBEDIT
if (m_editline_ap)
return m_editline_ap->GetCurrentLine();
#endif