Call el_resize when the window size changes.

<rdar://problem/13270100>

llvm-svn: 175926
This commit is contained in:
Jim Ingham 2013-02-22 22:56:55 +00:00
parent fb70380f2f
commit c46fe7c0d1
4 changed files with 22 additions and 1 deletions

View File

@ -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);
}
}
}

View File

@ -151,6 +151,9 @@ public:
{
m_done = true;
}
void
ResizeWindow (unsigned short col);
private:
lldb::SBDebugger m_debugger;

View File

@ -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)
{

View File

@ -104,6 +104,9 @@ public:
static unsigned char
ElCompletionFn (EditLine *e, int ch);
void
ElResize();
protected: