less
less copied to clipboard
Initial part of manually colored prompt is colored incorrectly
Steps to reproduce:
Run echo hello | ./less --use-color -R -Ps$(printf 'aa\e[41mbb\e[mcc')
Expected result: Prompt should be "aabbcc" with the "aa" and "cc" uncolored, and the "bb" colored red.
Actual result: "aa" is colored with the default prompt color instead of being uncolored.
Tested on less-643.
Fixed in c33b98e9e228918bf1ee0af66120fe550282c8a4.