Skip to content
  • Patrick Palka's avatar
    Fix truncation of TUI command history · d9080678
    Patrick Palka authored
    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.
    d9080678