simon-git: putty (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu Apr 3 21:32:50 BST 2025
TL;DR:
f2d63388 Stop cursor attributes being temporary
7a100534 Rename cursor attributes from the TATTR_ to the ATTR_ namespace
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2025-04-03 21:32:50
commit f2d63388a8dcc18f065f74dbd067f92c5ccc291c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f2d63388a8dcc18f065f74dbd067f92c5ccc291c;hp=7f96069954dd3c903256a2ca8ae26ece0a274c51
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Thu Apr 3 20:08:06 2025 +0100
Stop cursor attributes being temporary
When telling front ends to paint the screen, the terminal code treats
the cursor as an attribute applied to the character cell(s) it appears
in. do_paint() detects changes to most such attributes by storing what
it last sent to the front end in term->disptext and comparing that with
what it thinks should be displayed in the window. However, before this
commit the cursor was special. Its last-drawn position was recorded in
special structure members and invalidated parts of the display based on
those. The cursor attributes were treated as "temporary attributes" and
were not saved in term->disptext.
This commit regularizes this and turns the cursor attributes into normal
attributes that are stored in term->disptext. This removes a bunch of
special-case code in do_paint() because now the normal update code
handles the cursor properly, and also removes some members from the
Terminal structure. I hope it will also make future cursor-handling
changes (for instance for input method pre-editing) simpler.
This commit makes the required semantic changes but doesn't make the
rather more pervasive change of actually renaming the attributes from
TATTR_ to ATTR_. That will be in the next commit.
putty.h | 2 +-
terminal/terminal.c | 29 +----------------------------
terminal/terminal.h | 2 --
3 files changed, 2 insertions(+), 31 deletions(-)
commit 7a100534d3dbfd4ce06245fee0dcec04cd724a72
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=7a100534d3dbfd4ce06245fee0dcec04cd724a72;hp=f2d63388a8dcc18f065f74dbd067f92c5ccc291c
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Thu Apr 3 20:50:36 2025 +0100
Rename cursor attributes from the TATTR_ to the ATTR_ namespace
No functional change.
putty.h | 28 ++++++++++++++--------------
terminal/terminal.c | 8 ++++----
unix/window.c | 14 +++++++-------
windows/window.c | 14 +++++++-------
4 files changed, 32 insertions(+), 32 deletions(-)
More information about the tartarus-commits
mailing list