comparison libinterp/corefcn/sysdep.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 7bccc182e2f7
children 912158cf524d
comparison
equal deleted inserted replaced
19334:d6240c099a02 19336:37159a873c96
167 void 167 void
168 MINGW_signal_cleanup (void) 168 MINGW_signal_cleanup (void)
169 { 169 {
170 w32_set_quiet_shutdown (); 170 w32_set_quiet_shutdown ();
171 } 171 }
172
173 static void
174 w32_init (void)
175 {
176 w32_set_octave_home ();
177
178 command_editor::prefer_env_winsize (true);
179 }
172 #endif 180 #endif
173 181
174 #if defined (__MINGW32__) 182 #if defined (__MINGW32__)
175 static void 183 static void
176 MINGW_init (void) 184 MINGW_init (void)
177 { 185 {
178 w32_set_octave_home (); 186 w32_init ();
179 } 187 }
180 #endif 188 #endif
181 189
182 #if defined (_MSC_VER) 190 #if defined (_MSC_VER)
183 static void 191 static void
184 MSVC_init (void) 192 MSVC_init (void)
185 { 193 {
186 w32_set_octave_home (); 194 w32_init ();
187 } 195 }
188 #endif 196 #endif
189 197
190 198
191 // Return TRUE if FILE1 and FILE2 refer to the same (physical) file. 199 // Return TRUE if FILE1 and FILE2 refer to the same (physical) file.