webterm: retain prompt on %clr

This commit is contained in:
fang 2020-11-06 22:35:38 +01:00
parent acd9176d76
commit 8e77764cfc
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -24,7 +24,8 @@ export default class Store {
beep.play();
break;
case 'clr':
this.setState({ lines: [''] });
this.state.lines = this.state.lines.slice(-1);
this.setState({ lines: this.state.lines });
break;
case 'hop':
this.setState({ cursor: blit.hop });