+2019-06-25 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-layout.c (show_source_disasm_command)
+ (show_source_or_disasm_and_command): Update.
+ * tui/tui-io.c (update_cmdwin_start_line)
+ (tui_redisplay_readline): Update.
+ * tui/tui-data.h (struct tui_command_info): Remove.
+ (struct tui_win_info) <detail>: Remove command_info member.
+ (struct tui_data_window) <start_line>: New member, from
+ tui_command_info.
+ (TUI_CMD_WIN): Add casts.
+
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_update_source_window)
};
-struct tui_command_info
-{
- int start_line;
-};
-
-
/* This defines information about each logical window. */
struct tui_win_info
{
union
{
struct tui_data_info data_display_info;
- struct tui_command_info command_info;
}
detail;
void clear_detail () override;
+ int start_line;
+
protected:
void do_scroll_vertical (enum tui_scroll_direction,
#define TUI_SRC_WIN ((tui_source_window_base *) tui_win_list[SRC_WIN])
#define TUI_DISASM_WIN ((tui_source_window_base *) tui_win_list[DISASSEM_WIN])
#define TUI_DATA_WIN tui_win_list[DATA_WIN]
-#define TUI_CMD_WIN tui_win_list[CMD_WIN]
+#define TUI_CMD_WIN ((tui_cmd_window *) tui_win_list[CMD_WIN])
/* Data Manipulation Functions. */
extern void tui_initialize_static_data (void);
static void
update_cmdwin_start_line ()
{
- TUI_CMD_WIN->detail.command_info.start_line
+ TUI_CMD_WIN->start_line
= getcury (TUI_CMD_WIN->generic.handle);
}
c_pos = -1;
c_line = -1;
w = TUI_CMD_WIN->generic.handle;
- start_line = TUI_CMD_WIN->detail.command_info.start_line;
+ start_line = TUI_CMD_WIN->start_line;
wmove (w, start_line, 0);
prev_col = 0;
height = 1;
waddch (w, c);
}
if (c == '\n')
- TUI_CMD_WIN->detail.command_info.start_line = getcury (w);
+ TUI_CMD_WIN->start_line = getcury (w);
col = getcurx (w);
if (col < prev_col)
height++;
prev_col = col;
}
wclrtobot (w);
- TUI_CMD_WIN->detail.command_info.start_line = getcury (w);
+ TUI_CMD_WIN->start_line = getcury (w);
if (c_line >= 0)
wmove (w, c_line, c_pos);
- TUI_CMD_WIN->detail.command_info.start_line -= height - 1;
+ TUI_CMD_WIN->start_line -= height - 1;
wrefresh (w);
fflush(stdout);
tui_show_source_content (TUI_DISASM_WIN);
if (TUI_CMD_WIN == NULL)
- TUI_CMD_WIN = make_command_window (cmd_height,
- tui_term_height () - cmd_height);
+ tui_win_list[CMD_WIN]
+ = make_command_window (cmd_height, tui_term_height () - cmd_height);
else
{
init_gen_win_info (&TUI_CMD_WIN->generic,
if (TUI_CMD_WIN == NULL)
{
- TUI_CMD_WIN = make_command_window (cmd_height, src_height);
+ tui_win_list[CMD_WIN] = make_command_window (cmd_height,
+ src_height);
tui_refresh_win (&TUI_CMD_WIN->generic);
}
else