Skip to content

Commit f357d44

Browse files
author
Benjamin Pasero
committed
💄 editor group perf
1 parent 3555386 commit f357d44

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vs/workbench/common/editor/editorGroup.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ export class EditorGroup extends Disposable {
383383

384384
moveEditor(candidate: EditorInput, toIndex: number): EditorInput | undefined {
385385
const index = this.indexOf(candidate);
386-
if (index < 0) {
386+
if (index < 0 || toIndex === index) {
387387
return;
388388
}
389389

@@ -481,6 +481,10 @@ export class EditorGroup extends Disposable {
481481
isPinned(editor: EditorInput): boolean;
482482
isPinned(index: number): boolean;
483483
isPinned(arg1: EditorInput | number): boolean {
484+
if (!this.preview) {
485+
return true; // no preview editor
486+
}
487+
484488
let editor: EditorInput;
485489
let index: number;
486490
if (typeof arg1 === 'number') {

0 commit comments

Comments
 (0)