summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-29 18:04:18 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-29 18:04:18 (EDT)
commit3776a285013fc42ba733d7e9b0c1a1660c2ba05a (patch)
tree902992303186076956fd8bcc3763fa4c8da2321b /src/ui
parent65c0b8bf6fde4e708a5c822a9c424b9f11884584 (diff)
downloadfirman.sh-3776a285013fc42ba733d7e9b0c1a1660c2ba05a.zip
firman.sh-3776a285013fc42ba733d7e9b0c1a1660c2ba05a.tar.gz
firman.sh-3776a285013fc42ba733d7e9b0c1a1660c2ba05a.tar.bz2
_tui_box(): Fix coordinate offsets
Rows and columns are counted from 1.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/tui.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/tui.sh b/src/ui/tui.sh
index 078e3e4..1bc16f4 100644
--- a/src/ui/tui.sh
+++ b/src/ui/tui.sh
@@ -46,8 +46,8 @@ _tui_box()
# Clear the screen and set the cursor position to center the box.
term_attr_reset
term_clear
- y=$(expr \( $(term_lines) - ${h} \) / 2)
- x=$(expr \( $(term_columns) - ${w} \) / 2)
+ y=$(expr \( $(term_lines) - ${h} \) / 2 + 1)
+ x=$(expr \( $(term_columns) - ${w} \) / 2 + 1)
term_cursor_position ${y} ${x}
# Build the line.