Skip to content

Commit 64cb10d

Browse files
committed
Fix #5861. Take minimap into account
1 parent f468a99 commit 64cb10d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/editor/contrib/find/browser/findWidget.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export class FindWidget extends Widget implements IOverlayWidget {
109109

110110
let checkEditorWidth = () => {
111111
let editorWidth = this._codeEditor.getConfiguration().layoutInfo.width;
112+
let minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth;
112113
let collapsedFindWidget = false;
113114
let reducedFindWidget = false;
114115
let narrowFindWidget = false;
@@ -118,7 +119,7 @@ export class FindWidget extends Widget implements IOverlayWidget {
118119
if (WIDGET_FIXED_WIDTH + 28 >= editorWidth) {
119120
narrowFindWidget = true;
120121
}
121-
if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 >= editorWidth) {
122+
if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) {
122123
reducedFindWidget = true;
123124
}
124125
dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget);

0 commit comments

Comments
 (0)