diff mbox

[03/24] Fix latent display bug in tui_data_window

Message ID 20200104183410.17114-4-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey Jan. 4, 2020, 6:33 p.m. UTC
tui_data_window creates new curses windows, but does not pass in
coordinates relative to the data window's origin.  This means that the
data window could only ever be displayed as the topmost window in a
layout.  This is not a currently problem, because all the existing
layouts do this; but a subsequent patch will add user-defined layouts,
which could do otherwise.

gdb/ChangeLog
2020-01-04  Tom Tromey  <tom@tromey.com>

	* tui/tui-regs.c (tui_data_window::display_registers_from): Use
	correct coordinates.

Change-Id: I5101f2b2869557b87381ebdeebd9b7fd28687831
---
 gdb/ChangeLog      | 5 +++++
 gdb/tui/tui-regs.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 50b3e72e510..41b8f0d933c 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -274,7 +274,7 @@  tui_data_window::display_registers_from (int start_element_no)
 	{
 	  /* Create the window if necessary.  */
 	  m_regs_content[i].resize (1, item_win_width,
-				    (item_win_width * j) + 1, cur_y);
+				    x + (item_win_width * j) + 1, y + cur_y);
 	  i++;		/* Next register.  */
 	}
       cur_y++;		/* Next row.  */