Handle terminal being resized
This commit is contained in:
@@ -104,6 +104,11 @@ class Editor
|
||||
|
||||
while ($this->running) {
|
||||
[$w,$h] = $this->term->getSize();
|
||||
if ($this->term->resized) {
|
||||
$this->redrawEditor();
|
||||
$this->term->resized = false;
|
||||
}
|
||||
usleep(10000);
|
||||
$read = $this->term->readKey();
|
||||
switch ($read) {
|
||||
case 'k{UP}':
|
||||
|
||||
Reference in New Issue
Block a user