Skip to content

Commit e579bbb

Browse files
committed
fix: unpin command silently fails when tab is moved between panes
1 parent 83ff2bc commit e579bbb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/extensionsIntegrated/TabBar/drag-drop.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ define(function (require, exports, module) {
320320
// if the prev file is not pinned, we unpin this file too!
321321
if (!MainViewManager.isPathPinned(paneId, prevFilePath)) {
322322
const fileObj = FileSystem.getFileForPath(draggedPath);
323+
324+
// we consciously enable the unpin command here, because if the tab is pinned,
325+
// the unpin command will be disabled by default as the last context menu item
326+
// and the FILE_UNPIN command will not execute
327+
CommandManager.get(Commands.FILE_UNPIN).setEnabled(true);
323328
CommandManager.execute(Commands.FILE_UNPIN, { file: fileObj, paneId: paneId });
324329
}
325330
}

0 commit comments

Comments
 (0)