mirror of https://github.com/buggins/dlangui.git
Working now
This commit is contained in:
parent
761a7bc821
commit
64dab5989e
|
@ -510,35 +510,18 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction
|
||||||
int wrapsUpTo(int line)
|
int wrapsUpTo(int line)
|
||||||
{
|
{
|
||||||
int sum;
|
int sum;
|
||||||
lineSpanIterate(delegate(int wantedLine, int wantedWrap)
|
lineSpanIterate(delegate(LineSpan curSpan)
|
||||||
{
|
{
|
||||||
if (wantedLine < line)
|
if (curSpan.start < line)
|
||||||
sum += _span[wantedLine].len - 1;
|
sum += curSpan.len - 1;
|
||||||
});
|
});
|
||||||
return sum;
|
return sum;
|
||||||
/*if(line < _span.length)
|
|
||||||
{
|
|
||||||
|
|
||||||
int sum;
|
|
||||||
for(int i = 0; i<line; i++)
|
|
||||||
{
|
|
||||||
sum += _span[i].len - 1;
|
|
||||||
}
|
|
||||||
//Log.d(sum);
|
|
||||||
return sum;
|
|
||||||
}*/
|
|
||||||
//return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lineSpanIterate(void delegate(int wantedLine, int wantedWrap) iterator)
|
void lineSpanIterate(void delegate(LineSpan curSpan) iterator)
|
||||||
{
|
{
|
||||||
for (int i; i<_span.length; i++)
|
foreach (currentSpan; _span)
|
||||||
{
|
iterator(currentSpan);
|
||||||
for (int q; q<_span[i].wrapPoints.length; q++)
|
|
||||||
{
|
|
||||||
iterator(i, q);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// override to add custom items on left panel
|
/// override to add custom items on left panel
|
||||||
|
|
Loading…
Reference in New Issue