Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot read property 'getSelectedText' of undefined #14

Closed
amitab opened this issue Mar 10, 2016 · 1 comment
Closed
Assignees
Labels

Comments

@amitab
Copy link
Owner

amitab commented Mar 10, 2016

How to reproduce:

  1. Have no buffers opened in atom
  2. Run command atom-cscope:find-this-symbol (Infact any of the commands which try to take word from under the cursor throws this error.

Atom Version: 1.5.3
System: Ubuntu 15.10
Thrown From: atom-cscope package, v0.13.0

Stack Trace

Uncaught TypeError: Cannot read property 'getSelectedText' of undefined

At /home/amitabh/github/atom-cscope/lib/atom-cscope.coffee:145

TypeError: Cannot read property 'getSelectedText' of undefined
    at Object.module.exports.AtomCscope.autoInputFromCursor (/home/amitabh/github/atom-cscope/lib/atom-cscope.coffee:145:32)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-cscope:find-this-symbol (/home/amitabh/github/atom-cscope/lib/atom-cscope.coffee:117:10)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/usr/share/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/usr/share/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:28.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:26.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:26.3.0 atom-cscope:toggle (atom-text-editor.editor)
     -0:24.5.0 command-palette:toggle (atom-text-editor.editor.mini.is-focused)
     -0:23.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:23.8.0 atom-cscope:toggle (atom-text-editor.editor.mini)
  2x -0:21.6.0 core:close (atom-text-editor.editor.is-focused)
     -0:20.5.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-atom-material-syntax.theme-atom-material-ui)
  7x -0:18.8.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:15.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:15.4.0 atom-cscope:find-this-symbol (atom-workspace.workspace.scrollbars-visible-always.theme-atom-material-syntax.theme-atom-material-ui)
     -0:03.6.0 command-palette:toggle (atom-pane.pane.active)
  7x -0:02.6.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -0:00.9.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:00.9.0 atom-cscope:find-this-symbol (atom-pane.pane.active)

Config

{
  "core": {
    "disabledPackages": [
      "open-on-github",
      "vim-mode",
      "vim-mode-zz",
      "vim-surround",
      "relative-numbers"
    ],
    "packagesWithKeymapsDisabled": [
      "git-history",
      "merge-conflicts",
      "autocomplete-clang",
      "symbols-tree-view"
    ],
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ]
  },
  "atom-cscope": {
    "cscopeIgnoreDir": "src/ gmock/"
  }
}

Installed Packages

# User
atom-cscope, v0.13.0
atom-material-syntax, v0.3.3
atom-material-ui, v0.8.1
autocomplete-clang, v0.8.9
emmet, v2.4.1
git-log, v0.4.1
language-cmake, v0.1.4
language-viml, v0.3.0
symbols-tree-view, v0.11.0
tree-view-git-modified, v0.6.2
tree-view-git-status, v0.2.2

# Dev
No dev packages
@amitab amitab self-assigned this Mar 10, 2016
@amitab amitab added the bug label Mar 10, 2016
@amitab
Copy link
Owner Author

amitab commented Mar 10, 2016

Fixed in master 7a42457

@amitab amitab closed this as completed Mar 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant