ArnaudRinquin / atom-zentabs

Keep the opened tabs amount below sanity.
MIT License
48 stars 26 forks source link

Uncaught TypeError: Cannot read property 'item' of undefined #29

Closed mattheworiordan closed 9 years ago

mattheworiordan commented 9 years ago

I am using ZenTabs with Atom, and have configured keyboard shortcuts so that I can pin tabs without right clicking on a tab each time. My keymap file looks like this:

'atom-workspace':
  'cmd-\'': 'zentabs:pintab'
  'cmd-"': 'zentabs:unpintab'

If I open a file, and press cmd-', I get this script error every time. If I however right click and chose Pin Tab, and then use the shortcut afterwards, it works every time without an error. Do you have any idea what may be causing this error?

BTW. It may be useful to have a command zentabs:togglepintab so that people can use one shortcut to pin and unpin tabs.

Thanks for a great plugin!

Uncaught TypeError: Cannot read property 'item' of undefined

/Users/mattheworiordan/.atom/packages/zentabs/lib/zentabs-controller.coffee:86
Hide Stack Trace
TypeError: Cannot read property 'item' of undefined
  at ZentabsController.module.exports.ZentabsController.pinTab (/Users/mattheworiordan/.atom/packages/zentabs/lib/zentabs-controller.coffee:86:16)
  at atom-workspace.<anonymous> (/Users/mattheworiordan/.atom/packages/zentabs/lib/zentabs-controller.coffee:1:1)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)
dorian-marchal commented 9 years ago

Why was this issue closed ?

rnemec commented 7 years ago

This is still not working. Great plugin but for "the keyboard people" this bug is pretty ugly.