JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Fix bug restoring cursor position
authorRoberto E. Vargas Caballero <k0ga@shike2.com>
Thu, 8 Nov 2012 16:15:26 +0000 (17:15 +0100)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Thu, 8 Nov 2012 16:15:26 +0000 (17:15 +0100)
commit950ff21e17af487b205ea0b666be015790114fa7
tree6c49ad8a200751177aca627fab8621ef9da24209
parent5d39afc9023bc9a692ba6faf590abf9397a890ae
Fix bug restoring cursor position

Sequences like DECSC, DECRC, ESC [?1047l or ESC [?1047h save and restore
cursor attributes, than taken from vt100 manual are:

       Save Cursor (DECSC) ESC   7
       ===========================
       Saves the following in terminal memory.

      - cursor position
      - graphic rendition
      - character set shift state
      - state of wrap flag
      - state of origin mode

      Restore Cursor (DECRC) ESC 8
      ===========================
      Restores the states described for (DECSC) above. If none of these
      characteristics were saved, the cursor moves to home position; origin
      mode is reset; no character attributes are assigned; and the default
      character set mapping is established.

This implies that hide attribute of the cursor should not be saved/restored
in these sequences. The best way to fix this problem is moving hide
attribute into the terminal mode, instead of having it in the cursor state.
---
 st.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
st.c