aboutsummaryrefslogtreecommitdiff
path: root/ttt.c
diff options
context:
space:
mode:
authordam <dam@gudinoff>2023-01-22 02:25:56 +0000
committerdam <dam@gudinoff>2023-01-22 02:25:56 +0000
commit393e5a926cd105c4a2f902824a233cc41af91198 (patch)
tree6687b1ff543e212ef8301f5a412a711c4c9e28ed /ttt.c
parentd590a53cd9d6aa119bff0b65a6c23e15f99ad2ef (diff)
downloadtask-time-tracker-393e5a926cd105c4a2f902824a233cc41af91198.tar.zst
task-time-tracker-393e5a926cd105c4a2f902824a233cc41af91198.zip
Fix multi-byte characters on task name causing empty spaces at the end of the column.v1.0
Diffstat (limited to 'ttt.c')
-rw-r--r--ttt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ttt.c b/ttt.c
index 8b8a1ca..de3c690 100644
--- a/ttt.c
+++ b/ttt.c
@@ -1095,6 +1095,8 @@ void draw_tui(database_st *db, layout_st *layout) {
// Task title.
x++;
column_width = layout->columns[L_TITLE_IDX].width;
+ // Make sure multi-byte characters don't introduce empty spaces.
+ mvprintw(y, x, "%*s", column_width, "");
mvprintw(y, x, "%-*.*s", column_width, column_width, task->name);
x += column_width;