Skip to content
Snippets Groups Projects
Commit 5bf12c0d authored by rswindell's avatar rswindell
Browse files

New Ctrl-A codes:

'J' - Clear to End-of-Screen, for ANSI users sends <ESC>[J, nothing otherwise
'`' - Home Cursor, for ANSI users sends <ESC>[H, form feed otherwise
parent 40f55f61
No related branches found
No related tags found
No related merge requests found
......@@ -377,6 +377,12 @@ void sbbs_t::cleartoeol(void)
}
}
void sbbs_t::cleartoeos(void)
{
if(term_supports(ANSI))
rputs("\x1b[J");
}
/****************************************************************************/
/* performs the correct attribute modifications for the Ctrl-A code */
/****************************************************************************/
......@@ -483,9 +489,15 @@ void sbbs_t::ctrl_a(char x)
case 'S': /* Synchronize */
ASYNC;
break;
case 'J': /* clear to end-of-screen */
cleartoeos();
break;
case 'L': /* CLS (form feed) */
CLS;
break;
case '`': /* Home cursor */
cursor_home();
break;
case '>': /* CLREOL */
cleartoeol();
break;
......
......@@ -667,6 +667,7 @@ public:
void center(char *str);
void clearline(void);
void cleartoeol(void);
void cleartoeos(void);
void cursor_home(void);
void cursor_up(int count=1);
void cursor_down(int count=1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment