aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-09-19 15:16:19 +0100
committerIan Fan <ianfan0@gmail.com>2018-09-21 14:33:49 +0100
commitdbda5d35eb448a7c2f846c3ade8c9659be9928ef (patch)
tree3f4885fb6a4708c7515facc89ac3bcac4f876dbe /swaybar
parente6a52ae387ff3db64cc0867415368bd711c41566 (diff)
swaybar: update buffer_pos when moving object to start of buffer
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/i3bar.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c
index 88404703..4ea9c4c1 100644
--- a/swaybar/i3bar.c
+++ b/swaybar/i3bar.c
@@ -204,6 +204,7 @@ bool i3bar_handle_readable(struct status_line *status) {
status->buffer_index -= buffer_pos;
memmove(status->buffer, &status->buffer[buffer_pos],
status->buffer_index);
+ buffer_pos = 0;
} else {
// expand buffer
status->buffer_size *= 2;