Commit 2627ac31 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

fix issue with duplicate line of first line in document

BUG: 309241
parent f076a0de
......@@ -195,14 +195,14 @@ function _duplicateLines(up)
var toLine = -1;
var selectionRange = view.selection();
if (selectionRange.isValid() && selectionRange.start.line > 0) {
if (selectionRange.isValid()) {
fromLine = selectionRange.start.line;
toLine = selectionRange.end.line;
if (document.lineLength(toLine) > 0 && selectionRange.end.column == 0) {
//if selection ends at beginning of line, skip that line
toLine--;
}
} else if (view.cursorPosition().line > 0) {
} else {
toLine = view.cursorPosition().line;
fromLine = toLine;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment