summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-02-22 22:56:55 +0000
committerJim Ingham <jingham@apple.com>2013-02-22 22:56:55 +0000
commitc46fe7c0d18c5b6630ec1abf38480edc81ad33e4 (patch)
treedb479d5a8c844699d5560402e7b3859dabd7365d
parentfb70380f2f4d546c5ac37bb5bb98ad2c46810c41 (diff)
downloadbcm5719-llvm-c46fe7c0d18c5b6630ec1abf38480edc81ad33e4.tar.gz
bcm5719-llvm-c46fe7c0d18c5b6630ec1abf38480edc81ad33e4.zip
Call el_resize when the window size changes.
<rdar://problem/13270100> llvm-svn: 175926
-rw-r--r--lldb/tools/driver/Driver.cpp11
-rw-r--r--lldb/tools/driver/Driver.h3
-rw-r--r--lldb/tools/driver/IOChannel.cpp6
-rw-r--r--lldb/tools/driver/IOChannel.h3
4 files changed, 22 insertions, 1 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp
index 6b59b612f24..236a2f090bc 100644
--- a/lldb/tools/driver/Driver.cpp
+++ b/lldb/tools/driver/Driver.cpp
@@ -1611,6 +1611,15 @@ Driver::ReadyForCommand ()
}
}
+void
+Driver::ResizeWindow (unsigned short col)
+{
+ GetDebugger().SetTerminalWidth (col);
+ if (m_io_channel_ap.get() != NULL)
+ {
+ m_io_channel_ap->ElResize();
+ }
+}
void
sigwinch_handler (int signo)
@@ -1621,7 +1630,7 @@ sigwinch_handler (int signo)
{
if ((window_size.ws_col > 0) && g_driver != NULL)
{
- g_driver->GetDebugger().SetTerminalWidth (window_size.ws_col);
+ g_driver->ResizeWindow (window_size.ws_col);
}
}
}
diff --git a/lldb/tools/driver/Driver.h b/lldb/tools/driver/Driver.h
index 2366854dd11..357940be8e2 100644
--- a/lldb/tools/driver/Driver.h
+++ b/lldb/tools/driver/Driver.h
@@ -151,6 +151,9 @@ public:
{
m_done = true;
}
+
+ void
+ ResizeWindow (unsigned short col);
private:
lldb::SBDebugger m_debugger;
diff --git a/lldb/tools/driver/IOChannel.cpp b/lldb/tools/driver/IOChannel.cpp
index 92bd3720fc7..247d930ca40 100644
--- a/lldb/tools/driver/IOChannel.cpp
+++ b/lldb/tools/driver/IOChannel.cpp
@@ -90,6 +90,12 @@ IOChannel::ElCompletionFn (EditLine *e, int ch)
}
}
+void
+IOChannel::ElResize()
+{
+ el_resize(m_edit_line);
+}
+
unsigned char
IOChannel::HandleCompletion (EditLine *e, int ch)
{
diff --git a/lldb/tools/driver/IOChannel.h b/lldb/tools/driver/IOChannel.h
index fbeaac4a868..0a6b2d0ec65 100644
--- a/lldb/tools/driver/IOChannel.h
+++ b/lldb/tools/driver/IOChannel.h
@@ -104,6 +104,9 @@ public:
static unsigned char
ElCompletionFn (EditLine *e, int ch);
+
+ void
+ ElResize();
protected:
OpenPOWER on IntegriCloud