kaeluka / atom-haskell-hoogle

Look up stuff on hoogle
MIT License
0 stars 1 forks source link

Uncaught TypeError: editor.getLastSelection is not a function #7

Open bbiskup opened 8 years ago

bbiskup commented 8 years ago

[Enter steps to reproduce below:]

  1. Install haskell-hoogle package with "apm install haskell-hoogle" or in Atom Settings UI
  2. Open Atom
  3. Select menu option Packages -> haskell-hoogle -> Look Up

Atom Version: 1.8.0 System: Ubuntu 16.04 Thrown From: haskell-hoogle package, v0.1.3

Stack Trace

Uncaught TypeError: editor.getLastSelection is not a function

At /home/bb/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:10

TypeError: editor.getLastSelection is not a function
    at Object.module.exports.HaskellHoogle.getSearchText (/home/bb/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:10:19)
    at Object.module.exports.HaskellHoogle.lookup (/home/bb/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:13:13)
    at atom-workspace.<anonymous> (/home/bb/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:6:70)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/usr/share/atom/resources/app.asar/src/atom-environment.js:1100:28)
    at EventEmitter.outerCallback (/usr/share/atom/resources/app.asar/src/application-delegate.js:327:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

Commands

     -3:55.3.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:55.3.0 haskell-hoogle:lookup (atom-text-editor.editor)
     -3:53 command-palette:toggle (atom-text-editor.editor.is-focused)
  7x -3:47.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
  2x -3:45.8.0 core:move-up (atom-text-editor.editor.mini.is-focused)
     -3:44.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:44.8.0 haskell-hoogle:lookup (atom-text-editor.editor)
     -3:15.9.0 command-palette:toggle (div.panels-item)
     -3:14 core:move-right (atom-text-editor.editor.mini.is-focused)
  2x -3:13.2.0 core:move-down (atom-text-editor.editor.mini.is-focused)
     -3:06.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -2:59.5.0 editor:select-to-beginning-of-word (atom-text-editor.editor.mini.is-focused)
     -2:11.5.0 ide-haskell:prettify-file (div.package-detail.panels-item)
     -2:02.5.0 haskell-hoogle:lookup (div.package-detail.panels-item)
     -1:38.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
  3x -1:03.2.0 haskell-hoogle:lookup (button.btn.icon.enablement.icon-playback-pause)

Config

{
  "core": {
    "disabledPackages": [
      "elm-format"
    ]
  }
}

Installed Packages

# User
atom-beautify, v0.29.9
atom-typescript, v8.11.0
autocomplete-haskell, v0.6.5
formatter-gofmt, v1.0.1
haskell-ghc-mod, v1.14.6
haskell-hoogle, v0.1.3
haskell-pointfree, v0.1.3
haskell-unicode-snippets, v0.1.1
hover-tooltips-hdevtools, v0.10.0
hover-tooltips-liquid, v0.8.0
ide-haskell, v1.6.5
ide-haskell-cabal, v1.4.1
ide-haskell-repl, v0.0.23
language-elm, v1.5.0
language-haskell, v1.7.17
linter, v1.11.14
linter-liquidhaskell, v0.3.0

# Dev
No dev packages
ggreif commented 6 years ago

I got it today:

Uncaught TypeError: editor.getLastSelection is not a function
/C:/Users/ggreif/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:19

TypeError: editor.getLastSelection is not a function
    at Object.getSearchText (file:///C:/Users/ggreif/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:10:19)
    at Object.lookup (file:///C:/Users/ggreif/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:13:13)
    at HTMLElement.<anonymous> (file:///C:/Users/ggreif/.atom/packages/haskell-hoogle/lib/haskell-hoogle.coffee:6:70)
    at CommandRegistry.handleCommandEvent (C:\Users\ggreif\AppData\Local\atom\app-1.24.0-beta1\resources\app\src\command-registry.js:388:36)
    at CommandRegistry.dispatch (C:\Users\ggreif\AppData\Local\atom\app-1.24.0-beta1\resources\app\src\command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (C:\Users\ggreif\AppData\Local\atom\app-1.24.0-beta1\resources\app\src\atom-environment.js:1253:25)
    at EventEmitter.outerCallback (C:\Users\ggreif\AppData\Local\atom\app-1.24.0-beta1\resources\app\src\application-delegate.js:333:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)