jessegrosjean / foldingtext-for-atom

Outline editor with productivity features (No longer in development)
Other
40 stars 10 forks source link

Uncaught Error: Unexpected Granularity undefined #76

Open hoichi opened 8 years ago

hoichi commented 8 years ago

Hi!

Your plugin (which is pretty sweet otherwise) gives me the subj.

Reproducing is easy enough: select a whole line (say, with Home and Shift-End or vice versa) and press Ctrl-X.

Not that the error breaks anything, but still.

Atom Version: 1.0.19 System: Kubuntu 15.04 (diagnosed as Ubuntu 15.04 by Atom; dunno if DE matters) Thrown From: foldingtext-for-atom package, v0.9.2

Stack Trace

Uncaught Error: Unexpected Granularity undefined

At /home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/selection.coffee:413

Error: Unexpected Granularity undefined
    at Selection.nextItemOffsetInDirection (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/selection.coffee:413:19)
    at Selection.selectionByModifying (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/selection.coffee:241:13)
    at OutlineEditor.module.exports.OutlineEditor.modifySelectionRange (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/outline-editor.coffee:1172:43)
    at OutlineEditor.module.exports.OutlineEditor.delete (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/outline-editor.coffee:1583:10)
    at OutlineEditor.module.exports.OutlineEditor.cutSelection (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/outline-editor.coffee:1667:9)
    at ft-outline-editor.atom.commands.add.EventRegistery.stopEventPropagationAndGroupUndo.core:cut (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/outline-editor-element.coffee:1002:30)
    at ft-outline-editor.newCommandListeners.(anonymous function) (/home/hoichi/.atom/packages/foldingtext-for-atom/lib/editor/event-registery.coffee:171:27)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245: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:524:16)

Commands

     -0:50.8.0 editor:newline (span.ft-body-text)
  4x -0:47.9.0 core:backspace (span.ft-body-text)
     -0:47 editor:indent (span.ft-body-text)
     -0:44.7.0 editor:newline (span.ft-body-text)
     -0:41 core:save (span.ft-body-text)
     -0:35.5.0 editor:select-to-first-character-of-line (span.ft-body-text)
     -0:34.6.0 core:cut (span.ft-body-text)
     -0:30.3.0 core:undo (span.ft-body-text)
     -0:29.3.0 core:save (span.ft-body-text)
     -0:08.2.0 editor:move-to-end-of-screen-line (span.ft-body-text)
     -0:07.7.0 editor:select-to-first-character-of-line (span.ft-body-text)
     -0:04.6.0 core:cut (span.ft-body-text)
     -0:03.0 core:undo (span.ft-body-text)
     -0:02.2.0 editor:move-to-first-character-of-line (span.ft-body-text)
     -0:01.8.0 editor:select-to-end-of-line (span.ft-body-text)
     -0:00.8.0 core:cut (span.ft-body-text)

Config

{
  "core": {
    "themes": [
      "nucleus-dark-ui",
      "atom-dark-fusion-syntax"
    ]
  }
}

Installed Packages

# User
atom-dark-fusion-syntax, v0.7.0
clipboard-plus, v0.5.1
foldingtext-for-atom, v0.9.2
foldingtext-markdown, v1.3.2
imdone-atom, v1.1.45
nucleus-dark-ui, v0.5.14

# Dev
No dev packages