diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2009-05-28 09:16:11 +0200 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2009-05-28 09:16:11 +0200 |
commit | 730e8253ef6aebba4c572b5c6ef2461952a97f36 (patch) | |
tree | ac94e910b33827fc964252da7c3e88ca8699bed7 /alsamixer/textbox.c | |
parent | 8290353c5f9467ada94327010cebb6310bca0c8b (diff) |
alsamixer: fix text box clipping with multi-column characters
When a multi-column character would straddle the left window border of
a text box, we have to take the inserted space character into account
when we compute how many characters fit into the rest of the line.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'alsamixer/textbox.c')
-rw-r--r-- | alsamixer/textbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alsamixer/textbox.c b/alsamixer/textbox.c index 7825c15..d743a14 100644 --- a/alsamixer/textbox.c +++ b/alsamixer/textbox.c @@ -166,7 +166,7 @@ static void update_text_lines(void) if (width > current_left) waddch(text_widget.window, ' '); if (*line_begin != '\0') { - width = text_box_x; + width = text_box_x - (width > current_left); line_end = mbs_at_width(line_begin, &width, -1); if (width) waddnstr(text_widget.window, line_begin, |