terminal-util: don't process the same data twice when reading back bg color info
authorLennart Poettering <lennart@poettering.net>
Wed, 10 Jul 2024 14:06:30 +0000 (16:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Jul 2024 09:41:42 +0000 (11:41 +0200)
commit1df569b2e650afe254e09b337d598591f3068b61
tree3287326e45856c711bfc67e7e29fa0c15e432d8a
parent4c8c499e2c9f906f632b4955dd8db45a5ea96fd7
terminal-util: don't process the same data twice when reading back bg color info

If we only read partial information from the tty we ended up parsing it
again and again, confusing the state machine. hence, return how much
data we actually processed and drop it from the buffer.
src/basic/terminal-util.c