Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Problem in CodeEditor
Problem in CodeEditor [message #39138] |
Mon, 18 February 2013 14:57 |
|
koldo
Messages: 3356 Registered: August 2008
|
Senior Veteran |
|
|
Hello Mirek
I get an error using CodeEditor when pasting a text in an empty CodeEditor.
With line == 0, as li is empty,
void EditorBar::ClearErrors(int line)
{
int count;
if(line < 0) {
line = 0;
count = li.GetCount();
}
else
count = line + 1;
for(int i = line; i < count; i++)
li[i].error = 0; // Assert here
}
A possible solution could be this:
void EditorBar::ClearErrors(int line)
{
int count;
if(line < 0) {
line = 0;
count = li.GetCount();
}
else if (line >= li.GetCount()) // Added
count = li.GetCount();
else
count = line + 1;
for(int i = line; i < count; i++)
li[i].error = 0;
}
Best regards
Iñaki
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 23 15:48:01 CEST 2024
Total time taken to generate the page: 0.03139 seconds
|