mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-23 22:03:07 -06:00
CtrlLib: LineEdit: Fixed issue with very long lines #657
git-svn-id: svn://ultimatepp.org/upp/trunk@6886 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
376ada44b1
commit
79602d0f93
1 changed files with 8 additions and 3 deletions
|
|
@ -88,9 +88,14 @@ void LineEdit::Paint0(Draw& w) {
|
|||
int fascent = font.Info().GetAscent();
|
||||
Color showcolor = Blend(SColorLight, SColorHighlight);
|
||||
for(int i = sc.y; i < ll; i++) {
|
||||
WString tx = line[i];
|
||||
if(tx.GetLength() > 100000) // Do not go out of memory for patologic cases...
|
||||
tx.Trim(100000);
|
||||
WString tx;
|
||||
if(line[i].text.GetLength() > 100000) { // Do not go out of memory for patologic cases...
|
||||
String h = line[i].text;
|
||||
h.Trim(100000);
|
||||
tx = h.ToWString();
|
||||
}
|
||||
else
|
||||
tx = line[i];
|
||||
int len = tx.GetLength();
|
||||
if(w.IsPainting(0, y, sz.cx, fsz.cy)) {
|
||||
Highlight ih;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue