aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-09-24 18:36:13 +0200
committerOmar Polo <op@omarpolo.com>2021-09-24 18:36:13 +0200
commitd8721789910b9ce239711713db88d608a8b1985d (patch)
tree02a6d165a749bfa8b1f1964f4aafb04a167aba4e
parentd804a1b1bb6a74351b5b34cfef88256b75f6f21e (diff)
downloadtelescope-proposal/break-page.tar.gz
telescope-proposal/break-page.tar.bz2
refactor print_line_breakproposal/break-page
-rw-r--r--ui.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index e075cab..8948117 100644
--- a/ui.c
+++ b/ui.c
@@ -440,10 +440,13 @@ print_vline_descr(int width, WINDOW *window, struct vline *vl)
static inline void
print_line_break(int width, WINDOW *window)
{
- int x, y;
+ int x, y, len;
+ const char *sep = "-*-*-";
+
+ len = utf8_swidth(sep);
getyx(window, y, x);
- mvwprintw(window, y, width/2 - 4, "-*-*-");
+ mvwprintw(window, y, width/2 - len, sep);
}
/*