Keep the initial wrapped line upon dragging

This commit is contained in:
Simon Lamon
2022-03-02 16:17:31 +00:00
parent 78c2f06107
commit 4799832a33
2 changed files with 12 additions and 1 deletions
@@ -116,6 +116,12 @@ describe('SelectionModel', () => {
model.selectionStartLength = 4;
assert.deepEqual(model.finalSelectionEnd, [2, 3]);
});
it('should return the end on a different row when start + length overflows onto a following row with selectionEnd inbetween', () => {
model.selectionStart = [78, 2];
model.selectionEnd = [79, 2];
model.selectionStartLength = 4;
assert.deepEqual(model.finalSelectionEnd, [2, 3]);
});
it('should return selection end if selection end is after selection start + length', () => {
model.selectionStart = [2, 2];
model.selectionStartLength = 2;