Position cursor on first column on diff chunk navigation

Navigation by clicking on the scroll bar still positions the cursor on
the last column. Only initial position and navigation per keys 'p' and
'n' is changed.

Change-Id: I968171ed1293d722c07f816e3c4a154d23cdac7a
This commit is contained in:
David Ostrovsky 2015-05-19 08:09:21 +02:00 committed by Saša Živkov
parent dd47950027
commit 5ac80fd937
2 changed files with 2 additions and 2 deletions

View File

@ -317,7 +317,7 @@ class ChunkManager {
DiffChunkInfo target = chunks.get(res);
CodeMirror targetCm = host.getCmFromSide(target.getSide());
targetCm.setCursor(Pos.create(target.getStart()));
targetCm.setCursor(Pos.create(target.getStart(), 0));
targetCm.focus();
targetCm.scrollToY(
targetCm.heightAtLine(target.getStart(), "local") -

View File

@ -204,7 +204,7 @@ public class CodeMirror extends JavaScriptObject {
if (lineAtHeight(height - 20) < line) {
scrollToY(heightAtLine(line, "local") - 0.5 * height);
}
setCursor(Pos.create(line));
setCursor(Pos.create(line, 0));
}
public final native ScrollInfo getScrollInfo() /*-{