yaft: prepare for neutrino shellwindow compatibility

* add sigc function to collect terminal output
* terminal output is collected without escape codes, "text only"
* if a newline is seen, each newline starts a new line,
* else, some cursor move escape sequences start a new line
This commit is contained in:
Stefan Seyfried
2018-01-07 22:56:14 +01:00
committed by Thilo Graf
parent 8cf9486fdd
commit ad851bcc06
5 changed files with 56 additions and 5 deletions

View File

@@ -13,7 +13,8 @@ void bs(struct terminal_t *term)
void tab(struct terminal_t *term)
{
int i;
const char *c = " ";
term->txt.back().append(c, 1);
for (i = term->cursor.x + 1; i < term->cols; i++) {
if (term->tabstop[i]) {
set_cursor(term, term->cursor.y, i);
@@ -25,6 +26,9 @@ void tab(struct terminal_t *term)
void nl(struct terminal_t *term)
{
term->nlseen = true;
term->txt.push("");
term->lines_available++;
move_cursor(term, 1, 0);
}