Merge pull request #124317 from jeanp413/fix-124127
Fixes terminal find widget should not cover tabs
This commit is contained in:
commit
d63078aaf0
3 changed files with 23 additions and 31 deletions
|
@ -14,13 +14,8 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-outer-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-outer-container,
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-groups-container,
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-group {
|
||||
height: 100%;
|
||||
}
|
||||
|
@ -28,7 +23,7 @@
|
|||
.monaco-workbench .pane-body.integrated-terminal .terminal-wrapper {
|
||||
display: none;
|
||||
margin: 0 10px;
|
||||
bottom: 2px; /* Matches padding-bottom on .terminal-outer-container */
|
||||
bottom: 2px;
|
||||
}
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-wrapper.active {
|
||||
display: block;
|
||||
|
@ -107,7 +102,7 @@
|
|||
}
|
||||
|
||||
/* Use the default cursor when alt is active to help with clicking to move cursor */
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-outer-container.alt-active .xterm {
|
||||
.monaco-workbench .pane-body.integrated-terminal .terminal-groups-container.alt-active .xterm {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
@ -157,8 +152,8 @@
|
|||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
.monaco-workbench.vs-dark.mac .pane-body.integrated-terminal .terminal-outer-container:not(.alt-active) .terminal:not(.enable-mouse-events),
|
||||
.monaco-workbench.hc-black.mac .pane-body.integrated-terminal .terminal-outer-container:not(.alt-active) .terminal:not(.enable-mouse-events) {
|
||||
.monaco-workbench.vs-dark.mac .pane-body.integrated-terminal .terminal-groups-container:not(.alt-active) .terminal:not(.enable-mouse-events),
|
||||
.monaco-workbench.hc-black.mac .pane-body.integrated-terminal .terminal-groups-container:not(.alt-active) .terminal:not(.enable-mouse-events) {
|
||||
cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,24 +94,24 @@ export class TerminalTabbedView extends Disposable {
|
|||
this._tabsListMenu = this._register(menuService.createMenu(MenuId.TerminalTabContext, contextKeyService));
|
||||
this._tabsListEmptyMenu = this._register(menuService.createMenu(MenuId.TerminalTabEmptyAreaContext, contextKeyService));
|
||||
|
||||
this._register(this._tabList = this._instantiationService.createInstance(TerminalTabList, this._tabListElement));
|
||||
this._register(this._findWidget = this._instantiationService.createInstance(TerminalFindWidget, this._terminalService.getFindState()));
|
||||
parentElement.appendChild(this._findWidget.getDomNode());
|
||||
this._tabList = this._register(this._instantiationService.createInstance(TerminalTabList, this._tabListElement));
|
||||
|
||||
this._terminalContainer = document.createElement('div');
|
||||
this._terminalContainer.classList.add('terminal-outer-container');
|
||||
this._terminalContainer.style.display = 'block';
|
||||
const terminalOuterContainer = $('.terminal-outer-container');
|
||||
this._terminalContainer = $('.terminal-groups-container');
|
||||
terminalOuterContainer.appendChild(this._terminalContainer);
|
||||
|
||||
this._tabTreeIndex = this._terminalService.configHelper.config.tabs.location === 'left' ? 0 : 1;
|
||||
this._terminalContainerIndex = this._terminalService.configHelper.config.tabs.location === 'left' ? 1 : 0;
|
||||
|
||||
this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE.bindTo(contextKeyService);
|
||||
this._findWidget = this._register(this._instantiationService.createInstance(TerminalFindWidget, this._terminalService.getFindState()));
|
||||
terminalOuterContainer.appendChild(this._findWidget.getDomNode());
|
||||
|
||||
this._terminalService.setContainers(parentElement, this._terminalContainer);
|
||||
|
||||
this._terminalIsTabsNarrowContextKey = KEYBINDING_CONTEXT_TERMINAL_IS_TABS_NARROW_FOCUS.bindTo(contextKeyService);
|
||||
this._terminalTabsFocusContextKey = KEYBINDING_CONTEXT_TERMINAL_TABS_FOCUS.bindTo(contextKeyService);
|
||||
this._terminalTabsMouseContextKey = KEYBINDING_CONTEXT_TERMINAL_TABS_MOUSE.bindTo(contextKeyService);
|
||||
this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE.bindTo(contextKeyService);
|
||||
|
||||
this._tabTreeIndex = this._terminalService.configHelper.config.tabs.location === 'left' ? 0 : 1;
|
||||
this._terminalContainerIndex = this._terminalService.configHelper.config.tabs.location === 'left' ? 1 : 0;
|
||||
|
||||
_configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration(TerminalSettingId.TabsEnabled) ||
|
||||
|
@ -133,7 +133,8 @@ export class TerminalTabbedView extends Disposable {
|
|||
this._register(this._themeService.onDidColorThemeChange(theme => this._updateTheme(theme)));
|
||||
this._updateTheme();
|
||||
|
||||
this._findWidget.focusTracker.onDidFocus(() => this._terminalContainer!.classList.add(FIND_FOCUS_CLASS));
|
||||
this._findWidget.focusTracker.onDidFocus(() => this._terminalContainer.classList.add(FIND_FOCUS_CLASS));
|
||||
this._findWidget.focusTracker.onDidBlur(() => this._terminalContainer.classList.remove(FIND_FOCUS_CLASS));
|
||||
|
||||
this._attachEventListeners(parentElement, this._terminalContainer);
|
||||
|
||||
|
@ -143,7 +144,7 @@ export class TerminalTabbedView extends Disposable {
|
|||
|
||||
this._splitView = new SplitView(parentElement, { orientation: Orientation.HORIZONTAL, proportionalLayout: false });
|
||||
|
||||
this._setupSplitView();
|
||||
this._setupSplitView(terminalOuterContainer);
|
||||
}
|
||||
|
||||
private _shouldShowTabs(): boolean {
|
||||
|
@ -250,7 +251,7 @@ export class TerminalTabbedView extends Disposable {
|
|||
this._storageService.store(widthKey, width, StorageScope.GLOBAL, StorageTarget.USER);
|
||||
}
|
||||
|
||||
private _setupSplitView(): void {
|
||||
private _setupSplitView(terminalOuterContainer: HTMLElement): void {
|
||||
this._register(this._splitView.onDidSashReset(() => this._handleOnDidSashReset()));
|
||||
this._register(this._splitView.onDidSashChange(() => this._handleOnDidSashChange()));
|
||||
|
||||
|
@ -258,7 +259,7 @@ export class TerminalTabbedView extends Disposable {
|
|||
this._addTabTree();
|
||||
}
|
||||
this._splitView.addView({
|
||||
element: this._terminalContainer,
|
||||
element: terminalOuterContainer,
|
||||
layout: width => this._terminalService.terminalGroups.forEach(tab => tab.layout(width, this._height || 0)),
|
||||
minimumSize: 120,
|
||||
maximumSize: Number.POSITIVE_INFINITY,
|
||||
|
@ -389,9 +390,9 @@ export class TerminalTabbedView extends Disposable {
|
|||
}
|
||||
}
|
||||
}));
|
||||
this._register(dom.addDisposableListener(this._terminalContainer, 'contextmenu', (event: MouseEvent) => {
|
||||
this._register(dom.addDisposableListener(terminalContainer, 'contextmenu', (event: MouseEvent) => {
|
||||
if (!this._cancelContextMenu) {
|
||||
this._openContextMenu(event, this._terminalContainer);
|
||||
this._openContextMenu(event, terminalContainer);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
|
|
|
@ -47,7 +47,6 @@ export class TerminalViewPane extends ViewPane {
|
|||
private _actions: IAction[] | undefined;
|
||||
private _fontStyleElement: HTMLElement | undefined;
|
||||
private _parentDomElement: HTMLElement | undefined;
|
||||
private _tabsViewWrapper: HTMLElement | undefined;
|
||||
private _terminalTabbedView?: TerminalTabbedView;
|
||||
get terminalTabbedView(): TerminalTabbedView | undefined { return this._terminalTabbedView; }
|
||||
private _terminalsInitialized = false;
|
||||
|
@ -160,10 +159,7 @@ export class TerminalViewPane extends ViewPane {
|
|||
if (!this._parentDomElement) {
|
||||
return;
|
||||
}
|
||||
this._tabsViewWrapper = document.createElement('div');
|
||||
this._tabsViewWrapper.classList.add('tabs-view-wrapper');
|
||||
this._terminalTabbedView = this.instantiationService.createInstance(TerminalTabbedView, this._parentDomElement);
|
||||
this._parentDomElement.append(this._tabsViewWrapper);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
|
|
Loading…
Reference in a new issue