mirror of https://github.com/buggins/dlangui.git
fix editors cursor placement
This commit is contained in:
parent
9f01f14645
commit
b037625854
|
@ -66,7 +66,7 @@
|
||||||
<debuglevel>0</debuglevel>
|
<debuglevel>0</debuglevel>
|
||||||
<debugids>DebugFocus</debugids>
|
<debugids>DebugFocus</debugids>
|
||||||
<versionlevel>0</versionlevel>
|
<versionlevel>0</versionlevel>
|
||||||
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_SDL</versionids>
|
<versionids>EmbedStandardResources Unicode USE_FREETYPE</versionids>
|
||||||
<dump_source>0</dump_source>
|
<dump_source>0</dump_source>
|
||||||
<mapverbosity>0</mapverbosity>
|
<mapverbosity>0</mapverbosity>
|
||||||
<createImplib>1</createImplib>
|
<createImplib>1</createImplib>
|
||||||
|
|
|
@ -1844,7 +1844,8 @@ class EditBox : EditWidgetBase {
|
||||||
lineIndex = 0;
|
lineIndex = 0;
|
||||||
if (lineIndex < _visibleLines.length) {
|
if (lineIndex < _visibleLines.length) {
|
||||||
res.line = lineIndex + _firstVisibleLine;
|
res.line = lineIndex + _firstVisibleLine;
|
||||||
for (int i = 0; i < _visibleLinesMeasurement[lineIndex].length; i++) {
|
int len = cast(int)_visibleLines[lineIndex].length;
|
||||||
|
for (int i = 0; i < len; i++) {
|
||||||
int x0 = i > 0 ? _visibleLinesMeasurement[lineIndex][i - 1] : 0;
|
int x0 = i > 0 ? _visibleLinesMeasurement[lineIndex][i - 1] : 0;
|
||||||
int x1 = _visibleLinesMeasurement[lineIndex][i];
|
int x1 = _visibleLinesMeasurement[lineIndex][i];
|
||||||
int mx = (x0 + x1) >> 1;
|
int mx = (x0 + x1) >> 1;
|
||||||
|
|
Loading…
Reference in New Issue