[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add support for ANSI.SYS SCP/RCP escape codes
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] Add support for ANSI.SYS SCP/RCP escape codes |
Date: |
Sat, 12 Sep 2015 11:15:44 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Hello,
James Clarke, le Sat 12 Sep 2015 00:42:05 +0100, a écrit :
> This adds support for CSI s and u, which are equivalent to ESC 7 and 8,
> saving/restoring the cursor position.
Just curious: in which case did you see it a problem, or is it just for
completeness? (which can always become convenient anyway)
> + case 's': /* ANSI.SYS: Save cursor and attributes. */
> + /* Save cursor position: <scp>. */
Why scp? AIUI from terminfo(5), scp is the capname for set_color_pair,
the tcap code for save cursor position is sc.
> + display->cursor.saved_x = user->cursor.col;
> + display->cursor.saved_y = user->cursor.row;
> + break;
> + case 'u': /* ANSI.SYS: Restore cursor and attributes. */
> + /* Restore cursor position: <rcp>. */
> + user->cursor.col = display->cursor.saved_x;
> + user->cursor.row = display->cursor.saved_y;
> + /* In case the screen was larger before: */
> + limit_cursor (display);
> + break;
> case 'l':
> /* Reset mode. */
> for (i = 0; i < parse->nparams; i++)
> --
> 2.5.1
>
>