• rswindell's avatar
    Fix some cosmetic issues with saveline/restoreline and its interaction with · fa37e0a7
    rswindell authored
    getstr's insert mode (Ctrl-V) indicator and edit/line modes. Global Hot Keys
    (e.g. Ctrl-T) would do weird stuff like return the cursor to the end of the
    line or redraw the input string multiple times.
    So as part of this fix:
    - backspasce() now removed the last count characters from the save-line buffer
      (it is a destructive backspace afterall).
    - outchar('\b') (a non-destructive backspace) adds the \b to the save-line buf
    - restoreline() now always redraws the current insert/overwrite indicator in
      the upper right-most corner fo the screen
    - insert_indicator() now uses functions that aren't line-saved.
    
    An unrelated change included in this comment: center() now sends a CR before
    the cursor movement and centered-text, for times when the current column is
    *not* already at 0. Very useful for use with @-codes (e.g. display some pattern
    or "graphics" and then center some text over it).
    fa37e0a7
con_out.cpp 34.3 KB