Fix truncation of TUI command history
authorPatrick Palka <patrick@parcs.ath.cx>
Tue, 10 Feb 2015 23:44:56 +0000 (18:44 -0500)
committerPatrick Palka <patrick@parcs.ath.cx>
Wed, 11 Feb 2015 00:06:49 +0000 (19:06 -0500)
commitd9080678121a84fc433a5f2ee141ee98512d2167
treeda50ba69158beec20287e92ff638b44de11afe09
parent084910afdd2d98e3e60ff35f124549fc3c180edc
Fix truncation of TUI command history

If we submit a command while the prompt cursor is somewhere other than
at the end of the command line, the command line gets truncated as the
command window gets shifted one line up.  This happens because we fail
to properly move the cursor to the end of the command line before
transmitting the newline to ncurses.  We need to move the cursor because
when ncurses outputs a newline it truncates any text that appears
past the end of the cursor.

The fix is generic enough to work properly even in multi-line secondary
prompts like the quit prompt.

gdb/ChangeLog:

* tui/tui-io.c (tui_getc): Move cursor to the end of the command
line before printing a newline.
gdb/ChangeLog
gdb/tui/tui-io.c
This page took 0.024029 seconds and 4 git commands to generate.