« get me outta code hell

Fix layout when editor is unfocused - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-10-28 19:48:24 -0300
committerFlorrie <towerofnix@gmail.com>2019-10-28 19:48:24 -0300
commitda6c99a2a52c46bf547c64ff90a3afb8196a5324 (patch)
treec4bbc1c6f6f0f520fafa520d86caa8b47fcaedee
parentf14cc8b58356e8c75b8db90e4b5919d06c2cf529 (diff)
Fix layout when editor is unfocused
-rw-r--r--ui.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 2d3ae1f..66a7745 100644
--- a/ui.js
+++ b/ui.js
@@ -220,7 +220,10 @@ class AppElement extends FocusElement {
     this.textInfoPane.addChild(this.textEditor)
     this.textInfoPane.visible = false
 
-    this.textEditor.on('deselect', () => this.root.select(this.tabber))
+    this.textEditor.on('deselect', () => {
+      this.root.select(this.tabber)
+      this.fixLayout()
+    })
 
     if (!this.config.showTabberPane) {
       this.tabberPane.visible = false