mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Trim wide text properly at the RH edge of the screen.
[originally from svn r2055]
This commit is contained in:
parent
74f8f8e8ac
commit
b8625a2bf5
@ -1067,9 +1067,11 @@ void do_text(Context ctx, int x, int y, char *text, int len,
|
||||
}
|
||||
|
||||
if (lattr != LATTR_NORM) {
|
||||
if (x*2 >= cols)
|
||||
return;
|
||||
x *= 2;
|
||||
if (x >= cols)
|
||||
return;
|
||||
if (x + len*2 > cols)
|
||||
len = (cols-x)/2; /* trim to LH half */
|
||||
}
|
||||
|
||||
gdk_gc_set_foreground(gc, &inst->cols[nbg]);
|
||||
|
Loading…
Reference in New Issue
Block a user