2017-04-20 3 views

답변

2

이에 대한 옵션이 있습니다 :

-a, --add Open path as a new project in last used window. [boolean]

...하지만 예상대로 어쨌든, 그것은 작동하지 않습니다. 그러나, 나는 workaround를 발견했다.

이 코드는 라인 (862) src/main-process/atom-application.js의 주위 어딘가에 위치 :

if (existingWindow == null) { 
     if (currentWindow = window != null ? window : this.lastFocusedWindow) { 
     if (addToLastWindow || currentWindow.devMode === devMode && (stats.every(function(stat) { 
      return typeof stat.isFile === "function" ? stat.isFile() : void 0; 
     }) || stats.some(function(stat) { 
      return (typeof stat.isDirectory === "function" ? stat.isDirectory() : void 0) && !currentWindow.hasProjectPath(); 
     }))) { 
      existingWindow = currentWindow; 
     } 
     } 
    } 

주석으로 첫 번째 줄과 그 이전 닫는 대괄호 :

// if (existingWindow == null) { 
     if (currentWindow = window != null ? window : this.lastFocusedWindow) { 
     if (addToLastWindow || currentWindow.devMode === devMode && (stats.every(function(stat) { 
      return typeof stat.isFile === "function" ? stat.isFile() : void 0; 
     }) || stats.some(function(stat) { 
      return (typeof stat.isDirectory === "function" ? stat.isDirectory() : void 0) && !currentWindow.hasProjectPath(); 
     }))) { 
      existingWindow = currentWindow; 
     } 
     } 
// } 

... aaaand함으로써 해결할!

불행하게도 모든 원자 업데이트 후 재실행 할 필요가있는 모든^_^

+0

이를 후에하는 해킹이 불가능한 텍스트 편집기를 그것은'. – Raj

+0

@Raj의 경우, [atom Github page] (https://github.com/atom/atom/issues)에서 문제를 제기하는 것이 더 좋지 않습니까? 현재의 행동은 분명히 예상 된 행동이 아닙니다. – hidefromkgb

+0

그리고 BTW는 코드를 좀 더 읽었습니다. 정정이 합법적이라고 확신합니다. 왜냐하면 모든 것이'this.windowForPaths'와'this.lastFocusedWindow'의 우선 순위를 바꾸기 때문입니다. – hidefromkgb

관련 문제