Cursor set to end on replaceSelection calls

It's the default, but good to be specific
This commit is contained in:
Matt Pass
2014-06-18 16:50:03 +01:00
parent d5b6355261
commit 5d4e22d363
2 changed files with 4 additions and 4 deletions

View File

@@ -435,7 +435,7 @@ var ICEcoder = {
userSelStart = cM.getCursor('start');
userSelEnd = cM.getCursor('end');
lineExtra = userSelStart.line != userSelEnd.line && userSelEnd.ch == cM.getLine(userSelEnd.line).length ? "\n" : "";
cM.replaceSelection(cM.getSelection()+lineExtra+cM.getSelection(), "start");
cM.replaceSelection(cM.getSelection()+lineExtra+cM.getSelection(), "end");
cM.setSelection(userSelStart, userSelEnd);
} else {
if (!line) {line = cM.getCursor().line};
@@ -451,7 +451,7 @@ var ICEcoder = {
cM = ICEcoder.getcMInstance();
if (!line && cM.somethingSelected()) {
cM.replaceSelection("");
cM.replaceSelection("","end");
} else {
if (!line) {line = cM.getCursor().line};
ch = cM.getCursor().ch;