Skip to content

Commit

Permalink
Fixes #52227
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Sep 12, 2018
1 parent e3b93b8 commit 00a9e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/editor/common/viewModel/splitLinesCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,8 @@ export class SplitLinesCollection implements IViewModelLinesCollection {

if (modelEnd.lineNumber - modelStart.lineNumber <= range.endLineNumber - range.startLineNumber) {
// most likely there are no hidden lines => fast path
return this.model.getDecorationsInRange(new Range(modelStart.lineNumber, modelStart.column, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation);
// fetch decorations from column 1 to cover the case of wrapped lines that have whole line decorations at column 1
return this.model.getDecorationsInRange(new Range(modelStart.lineNumber, 1, modelEnd.lineNumber, modelEnd.column), ownerId, filterOutValidation);
}

let result: IModelDecoration[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ suite('ViewModelDecorations', () => {
});

assert.deepEqual(actualDecorations, [
'dec1',
'dec2',
'dec3',
'dec4',
Expand Down

0 comments on commit 00a9e54

Please sign in to comment.