mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 11:21:28 +00:00
Fix buffer issues in swaybar status line.
This commit is contained in:
parent
07b6be6214
commit
bac65078a2
|
@ -125,9 +125,12 @@ bool i3bar_handle_readable(struct status_line *status) {
|
||||||
status_error(status, "[failed to allocate buffer]");
|
status_error(status, "[failed to allocate buffer]");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
state->current_node += new_buffer - state->buffer;
|
||||||
|
cur += new_buffer - state->buffer;
|
||||||
state->buffer = new_buffer;
|
state->buffer = new_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur[n] = '\0';
|
||||||
bool redraw = false;
|
bool redraw = false;
|
||||||
while (*cur) {
|
while (*cur) {
|
||||||
if (state->nodes[state->depth] == JSON_NODE_STRING) {
|
if (state->nodes[state->depth] == JSON_NODE_STRING) {
|
||||||
|
|
Loading…
Reference in a new issue