comparison liboctave/util/cmd-edit.cc @ 19336:37159a873c96 gui-release

preserve text on Windows terminal resize (bug #41893; patch #8532) * QWinTerminalImpl.h, QWinTerminalImpl.cpp (QConsolePrivate::updateConsoleSize): Don't shrink the size of the console buffer. Store the terminal size in the environment. Force the command line editor (usually readline) to notice the change in screen size as soon as possible. (QWinTerminalImpl::QWinTerminalImpl): Connect set_screen_size_signal with parent set_screen_size slot. (QWinTerminalImpl::set_screen_size_signal): New signal. * main-window.h, main-window.cc (main_window::int_pair): New typedef. (main_window::set_screen_size_callback): New callback function. (main_window::set_screen_size): New slot. * sysdep.cc (w32_init): New function. Tell command_editor to prefer environment variables for window size. (MINGW_init, MSVC_init): Call w32_init. (QWinTerminalImpl::setSize): Emit set_screen_size_signal.
author John W. Eaton <jwe@octave.org>
date Thu, 09 Oct 2014 19:20:56 -0400
parents 49a5a4be04a1
children ad93e9be78ee
comparison
equal deleted inserted replaced
19334:d6240c099a02 19336:37159a873c96
1442 bool 1442 bool
1443 command_editor::filename_quoting_desired (bool arg) 1443 command_editor::filename_quoting_desired (bool arg)
1444 { 1444 {
1445 return (instance_ok ()) 1445 return (instance_ok ())
1446 ? instance->do_filename_quoting_desired (arg) : false; 1446 ? instance->do_filename_quoting_desired (arg) : false;
1447 }
1448
1449 bool
1450 command_editor::prefer_env_winsize (bool arg)
1451 {
1452 return (instance_ok ())
1453 ? instance->do_prefer_env_winsize (arg) : false;
1447 } 1454 }
1448 1455
1449 bool 1456 bool
1450 command_editor::interrupt (bool arg) 1457 command_editor::interrupt (bool arg)
1451 { 1458 {