mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 23:56:24 -04:00
The sentinel was appended to every \n-terminated line solely so that draw()'s prevFgColor tracking would reset to default for the trailing area; without it, an AttrReverse-styled last cell would carry its rendered bg past the end of the line. The same prevFgColor mechanism propagated AttrReverse past content on *unterminated* lines too — which doesn't match real terminal behavior (try `print '\x1b[7m\x1b[31mfoo'` in a shell: the reverse stops at the last character) and isn't relied on by anything in lazygit, since all our writers terminate lines with \n. Drop the sentinel cell, drop prevFgColor, and just have draw() paint trailing cells with the view's default fg/bg. The TestUnterminatedReverseLineExtendsToEdge regression test inverts to document the new (terminal-matching) behavior, renamed accordingly. TestWriteString expectations also drop the trailing "" that came from the sentinel. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| cheatsheet | ||
| commands | ||
| common | ||
| config | ||
| constants | ||
| env | ||
| fakes | ||
| gocui | ||
| gui | ||
| i18n | ||
| integration | ||
| jsonschema | ||
| logs | ||
| snake | ||
| tasks | ||
| theme | ||
| updates | ||
| utils | ||