Skip to content
  • Tom Tromey's avatar
    Call nonl before wgetch in TUI · 7a956928
    Tom Tromey authored
    PR tui/28819 points out that, in the TUI, the C-j and C-m keys cannot
    be bound differently in one's ~/.inputrc.  However, this works in
    other readline applications.
    
    The bug is that the TUI uses curses' "nl" mode, which causes wgetch to
    return the same value for both keys.  There is a "nonl" mode, but it
    also affects output.
    
    This patch fixes the bug by arranging to call nonl before reading a
    key and then nl afterward.  This avoids any potential problem with
    changing the output if gdb was to use nonl globally.
    
    gdb/ChangeLog
    2018-10-06  Tom Tromey  <tom@tromey.com>
    
    	PR tui/28819:
    	* tui/tui-io.c (gdb_wgetch): New function.
    	(tui_mld_getc, tui_getc): Use it.
    7a956928