« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index b16a5ec..6e4582b 100644
--- a/ui.js
+++ b/ui.js
@@ -2429,8 +2429,9 @@ class ContextMenu extends FocusElement {
 
     let height = Math.min(10, this.form.inputs.length)
 
-    width += 3 // Space for the pane border and scrollbar
+    width += 2 // Space for the pane border
     height += 2 // Space for the pane border
+    if (this.form.scrollBarVisible) width++
     this.w = width
     this.h = height