[Konsole-devel] [Bug 98410] scrolling slow after showing some japanese characters
Waldo Bastian
bastian at kde.org
Sun Feb 13 15:22:00 UTC 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=98410
bastian kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From bastian kde org 2005-02-13 16:21 -------
CVS commit by waba:
Don't set fixed_font flag permanently when double-width characters are
encountered.
BUG: 98410
M +11 -11 TEWidget.cpp 1.222
--- kdebase/konsole/konsole/TEWidget.cpp #1.221:1.222
@ -802,5 +802,4 @ HCNT("setImage");
hasBlinker = false;
- bool lineDraw = false;
int cf = -1; // undefined
int cb = -1; // undefined
@ -849,5 +848,6 @ HCNT("setImage");
int p = 0;
disstrU[p++] = c; //fontMap(c);
- lineDraw = isLineChar(c);
+ bool lineDraw = isLineChar(c);
+ bool doubleWidth = (ext[x+1].c == 0);
cr = ext[x].r;
cb = ext[x].b;
@ -858,11 +858,8 @ HCNT("setImage");
c = ext[x+len].c;
if (!c)
- {
- fixed_font = false;
continue; // Skip trailing part of multi-col chars.
- }
if (ext[x+len].f != cf || ext[x+len].b != cb || ext[x+len].r != cr ||
- !dirtyMask[x+len] || isLineChar(c) != lineDraw)
+ !dirtyMask[x+len] || isLineChar(c) != lineDraw || (ext[x+len+1].c == 0) != doubleWidth)
break;
@ -892,4 +889,6 @ HCNT("setImage");
if (lineDraw)
fixed_font = false;
+ if (doubleWidth)
+ fixed_font = false;
drawAttrStr(paint,
QRect(bX+tLx+font_w*x,bY+tLy+font_h*y,font_w*len,font_h),
@ -1056,4 +1055,5 @ void TEWidget::paintContents(QPainter &p
disstrU[p++] = c; //fontMap(c);
bool lineDraw = isLineChar(c);
+ bool doubleWidth = (image[loc(x,y)+1].c == 0);
int cf = image[loc(x,y)].f;
int cb = image[loc(x,y)].b;
@ -1063,17 +1063,15 @ void TEWidget::paintContents(QPainter &p
image[loc(x+len,y)].b == cb &&
image[loc(x+len,y)].r == cr &&
+ (image[loc(x+len,y)+1].c == 0) == doubleWidth &&
isLineChar( c = image[loc(x+len,y)].c) == lineDraw) // Assignment!
{
if (c)
disstrU[p++] = c; //fontMap(c);
- else
- fixed_font = false;
+ if (doubleWidth) // assert((image[loc(x+len,y)+1].c == 0)), see above if condition
+ len++; // Skip trailing part of multi-column char
len++;
}
if ((x+len < columns) && (!image[loc(x+len,y)].c))
- {
- fixed_font = false;
len++; // Adjust for trailing part of multi-column char
- }
if (!isBlinkEvent || (cr & RE_BLINK))
@ -1082,4 +1080,6 @ void TEWidget::paintContents(QPainter &p
if (lineDraw)
fixed_font = false;
+ if (doubleWidth)
+ fixed_font = false;
QString unistr(disstrU,p);
drawAttrStr(paint,
More information about the konsole-devel
mailing list