Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Ensure rl_get_screen_size() returns the actual terminal dimensions
@ 2014-09-01  1:25 Patrick Palka
  2014-09-04 10:48 ` Pedro Alves
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Palka @ 2014-09-01  1:25 UTC (permalink / raw)
  To: gdb-patches; +Cc: Patrick Palka

We should call rl_resize_terminal() before calling rl_get_screen_size()
to help ensure that rl_get_screen_size() will return the correct
terminal dimensions.  Doing so fixes a couple issues where TUI does not
correctly resize itself due to rl_get_screen_size() returning stale
terminal dimensions.

	* tui/tui-win.c (tui_resize_all): Call rl_resize_terminal before
	calling rl_get_screen_size.
---
 gdb/tui/tui-win.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index b117634..05539fe 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -655,6 +655,7 @@ tui_resize_all (void)
   int height_diff, width_diff;
   int screenheight, screenwidth;
 
+  rl_resize_terminal ();
   rl_get_screen_size (&screenheight, &screenwidth);
   width_diff = screenwidth - tui_term_width ();
   height_diff = screenheight - tui_term_height ();
-- 
2.1.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-04 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01  1:25 [PATCH] Ensure rl_get_screen_size() returns the actual terminal dimensions Patrick Palka
2014-09-04 10:48 ` Pedro Alves
2014-09-04 10:52   ` Pedro Alves
2014-09-04 11:58     ` Patrick Palka
2014-09-04 17:52       ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox