mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix trust-sigil handling when scrolling the terminal.
Previously, when we scrolled the terminal, the newly exposed line at the bottom would be immediately allocated a trust status corresponding to the current state of the terminal. So if you're in trusted mode and you print a newline, then the line scrolled on at the bottom immediately gets a trust sigil, whether you subsequently print anything on it or not. Up until now, that hasn't mattered, because we always _do_ print something on it. But if you don't - if you send \r\n\r\n to deliberately leave a blank line - then it turns out that's not what we want after all, because if the screen _doesn't_ scroll, the passed-over line remains completely blank, whereas if it does scroll the blank line gets a trust sigil, which is inconsistent. Now, terminal lines newly exposed by a scroll have untrusted status, just the same as terminal lines that were present in the initial blank screen. They only become trusted if you actually print at least one character on them (whereupon check_trust_status will re-clear them just in case). And this is now independent of whether the terminal has scrolled or not.
This commit is contained in:
parent
5eee8ca648
commit
27f00038e1
@ -2618,7 +2618,7 @@ static void scroll(Terminal *term, int topline, int botline,
|
||||
}
|
||||
resizeline(term, line, term->cols);
|
||||
clear_line(term, line);
|
||||
check_trust_status(term, line);
|
||||
line->trusted = false;
|
||||
addpos234(term->screen, line, botline);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user