Added code to set the cursor at end of line while scrolling.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
Abijeet 2018-06-10 17:04:54 +05:30
parent b936e1f403
commit 562225a77b

View File

@ -416,9 +416,13 @@ class MarkdownEditor {
if (lineNumber !== -1) {
this.cm.scrollIntoView({
line: lineNumber,
char: lines[lineNumber].length
}, 200);
this.cm.focus();
// set the cursor location.
this.cm.setCursor({
line: lineNumber,
char: lines[lineNumber].length
})
}
}