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>
|
||||
<debugids>DebugFocus</debugids>
|
||||
<versionlevel>0</versionlevel>
|
||||
<versionids>EmbedStandardResources Unicode USE_FREETYPE USE_SDL</versionids>
|
||||
<versionids>EmbedStandardResources Unicode USE_FREETYPE</versionids>
|
||||
<dump_source>0</dump_source>
|
||||
<mapverbosity>0</mapverbosity>
|
||||
<createImplib>1</createImplib>
|
||||
|
|
|
@ -1844,7 +1844,8 @@ class EditBox : EditWidgetBase {
|
|||
lineIndex = 0;
|
||||
if (lineIndex < _visibleLines.length) {
|
||||
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 x1 = _visibleLinesMeasurement[lineIndex][i];
|
||||
int mx = (x0 + x1) >> 1;
|
||||
|
|
Loading…
Reference in New Issue