From dbda5d35eb448a7c2f846c3ade8c9659be9928ef Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Wed, 19 Sep 2018 15:16:19 +0100 Subject: [PATCH] swaybar: update buffer_pos when moving object to start of buffer --- swaybar/i3bar.c | 1 + 1 file changed, 1 insertion(+) 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;