diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index b99cd6865cfee0c277663954101359f408e0dc1a..44847fb1b6feeb525a58f63bb65f775935d45a2f 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -156,7 +156,10 @@ export class FindModelBoundToEditorModel { findScope = this._decorations.getFindScope(); } if (findScope !== null) { - findScope = new Range(findScope.startLineNumber, 1, findScope.endLineNumber, this._editor.getModel().getLineMaxColumn(findScope.endLineNumber)); + if (findScope.startLineNumber !== findScope.endLineNumber) { + // multiline find scope => expand to line starts / ends + findScope = new Range(findScope.startLineNumber, 1, findScope.endLineNumber, this._editor.getModel().getLineMaxColumn(findScope.endLineNumber)); + } } let findMatches = this._findMatches(findScope, false, MATCHES_LIMIT);