summaryrefslogtreecommitdiff
path: root/src/bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bar.c')
-rw-r--r--src/bar.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bar.c b/src/bar.c
index d30d97d..25d9a46 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -377,15 +377,21 @@ draw_string (rp_screen *s, char *msg, int mark_start, int mark_end)
draw_partial_string (s, msg + start, part_len,
x_offset, y_offset, style);
- x_offset += rp_text_width (s, msg + start, part_len);
- start = i;
+ /* Adjust coordinates. */
if (print_reason & REASON_NEWLINE)
{
- start++;
x_offset = 0;
y_offset++;
+ /* Skip newline. */
+ start = i + 1;
}
+ else
+ {
+ x_offset += rp_text_width (s, msg + start, part_len);
+ start = i;
+ }
+
print_reason = REASON_NONE;
}
style = next_style;