mirror of https://github.com/adamdruppe/arsd.git
fix ctrl+arrow bug in getline
This commit is contained in:
parent
444eaa9759
commit
d52eca78a2
18
terminal.d
18
terminal.d
|
@ -4905,12 +4905,9 @@ class LineGetter {
|
||||||
cursorPosition--;
|
cursorPosition--;
|
||||||
}
|
}
|
||||||
aligned(cursorPosition, -1);
|
aligned(cursorPosition, -1);
|
||||||
if(!multiLineMode) {
|
|
||||||
if(cursorPosition < horizontalScrollPosition) {
|
if(cursorPosition < horizontalScrollPosition)
|
||||||
horizontalScrollPosition--;
|
positionCursor();
|
||||||
aligned(horizontalScrollPosition, -1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
break;
|
break;
|
||||||
|
@ -4927,12 +4924,9 @@ class LineGetter {
|
||||||
cursorPosition = cast(int) line.length;
|
cursorPosition = cast(int) line.length;
|
||||||
}
|
}
|
||||||
aligned(cursorPosition, 1);
|
aligned(cursorPosition, 1);
|
||||||
if(!multiLineMode) {
|
|
||||||
if(cursorPosition >= horizontalScrollPosition + availableLineLength()) {
|
if(cursorPosition > horizontalScrollPosition + availableLineLength())
|
||||||
horizontalScrollPosition++;
|
positionCursor();
|
||||||
aligned(horizontalScrollPosition, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue