forked from Bananymous/banan-os
Shell: Optimize drawing characters at the end of a command
This commit is contained in:
parent
981c0eb8bc
commit
234051d6bc
|
@ -1064,7 +1064,7 @@ int main(int argc, char** argv)
|
||||||
buffers[index].clear();
|
buffers[index].clear();
|
||||||
col = 0;
|
col = 0;
|
||||||
break;
|
break;
|
||||||
case '\x04':
|
case '\x04': // ^D
|
||||||
fprintf(stdout, "\n");
|
fprintf(stdout, "\n");
|
||||||
clean_exit();
|
clean_exit();
|
||||||
break;
|
break;
|
||||||
|
@ -1086,6 +1086,9 @@ int main(int argc, char** argv)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
MUST(buffers[index].insert(ch, col++));
|
MUST(buffers[index].insert(ch, col++));
|
||||||
|
if (col == buffers[index].size())
|
||||||
|
fputc(ch, stdout);
|
||||||
|
else
|
||||||
fprintf(stdout, "%c\e[s%s\e[u", ch, buffers[index].data() + col);
|
fprintf(stdout, "%c\e[s%s\e[u", ch, buffers[index].data() + col);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue