Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3f472f0

Browse filesBrowse files
msujewAlberto Iannaccone
authored and
Alberto Iannaccone
committed
Fix duplicated editor tabs (#1012)
1 parent 750c534 commit 3f472f0
Copy full SHA for 3f472f0

File tree

3 files changed

+18
-1
lines changed
Filter options

3 files changed

+18
-1
lines changed

‎arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,11 @@ export class ArduinoFrontendContribution
579579
(widget) => widget.editor.uri.toString() === uri
580580
);
581581
if (!widget || forceOpen) {
582-
return this.editorManager.open(new URI(uri), options);
582+
return this.editorManager.open(new URI(uri), options ?? {
583+
mode: 'reveal',
584+
preview: false,
585+
counter: 0
586+
});
583587
}
584588
}
585589

‎arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ import {
276276
import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider';
277277
import { MonitorModel } from './monitor-model';
278278
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl';
279+
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
280+
import { EditorManager } from './theia/editor/editor-manager';
279281

280282
const ElementQueries = require('css-element-queries/src/ElementQueries');
281283

@@ -525,6 +527,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
525527
bind(SearchInWorkspaceWidget).toSelf();
526528
rebind(TheiaSearchInWorkspaceWidget).toService(SearchInWorkspaceWidget);
527529

530+
rebind(TheiaEditorManager).to(EditorManager);
531+
528532
// replace search icon
529533
rebind(TheiaSearchInWorkspaceFactory)
530534
.to(SearchInWorkspaceFactory)
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager';
2+
3+
export class EditorManager extends TheiaEditorManager {
4+
5+
protected getOrCreateCounterForUri(): number {
6+
return 0;
7+
}
8+
9+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.