santip / swap-panes

Atom Package for swaping panes
https://atom.io/packages/swap-panes
MIT License
2 stars 1 forks source link

Swapping destroys 'target' pane #3

Open scorbeil opened 9 years ago

scorbeil commented 9 years ago

When I activate one of swap-panes' commands, the 'target' pane is destroyed. So, for example, if the left pane is active, and I hit alt-ctrl-shift-right, the right pane simply disappears, leaving only the left.

Less surprising, if I perform the reverse operation, swap-panes throws an Uncaught TypeError: Cannot read property '0' of undefined with the following stack trace:

TypeError: Cannot read property '0' of undefined
  at Object.module.exports.swap (C:\Users\scorbeil\.atom\packages\swap-panes\lib\swap-panes.coffee:30:6)
  at Object.module.exports.swapRight (C:\Users\scorbeil\.atom\packages\swap-panes\lib\swap-panes.coffee:10:18)
  at atom-workspace.<anonymous> (C:\Users\scorbeil\.atom\packages\swap-panes\lib\swap-panes.coffee:3:70)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\scorbeil\AppData\Local\atom\app-1.0.0\resources\app.asar\src\command-registry.js:241:29)
  at C:\Users\scorbeil\AppData\Local\atom\app-1.0.0\resources\app.asar\src\command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\scorbeil\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\scorbeil\AppData\Local\atom\app-1.0.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\scorbeil\AppData\Local\atom\app-1.0.0\resources\app.asar\src\window-event-handler.js:180:20)
danhper commented 8 years ago

I am seeing the same behavior here. I am using atom 1.7.4. Let me know if you need more details.