mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
Merge 3956833f49 into b3519c2d2f
This commit is contained in:
commit
6a028e4e45
1 changed files with 8 additions and 0 deletions
|
|
@ -115,6 +115,14 @@ bool status_handle_readable(struct status_line *status) {
|
|||
sway_log(SWAY_DEBUG, "Using text protocol.");
|
||||
status->protocol = PROTOCOL_TEXT;
|
||||
status->text = status->buffer;
|
||||
newline = strrchr(status->buffer, '\n');
|
||||
if (newline != NULL && newline[1] == '\0') {
|
||||
newline[0] = '\0';
|
||||
newline = strrchr(status->buffer, '\n');
|
||||
}
|
||||
if (newline != NULL) {
|
||||
memmove(status->buffer, newline + 1, strlen(newline + 1) + 1);
|
||||
}
|
||||
// intentional fall-through
|
||||
case PROTOCOL_TEXT:
|
||||
while (true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue