mustardamus / line-length-break

Atom Editor Package - breaks all lines that go over the preferred line length
https://atom.io/packages/line-length-break
MIT License
1 stars 1 forks source link

Uncaught TypeError: Cannot read property 'preferredLineLength' of undefined #13

Open katrinleinweber opened 6 years ago

katrinleinweber commented 6 years ago

Steps to reproduce:

  1. place cursor on a line beyond the wrap guide or select several such lines
  2. press Ctrl+Alt+B

Atom: 1.23.2 x64 Electron: 1.6.15 OS: NB-W8P15156 Thrown From: line-length-break package 0.4.0

Stack Trace

Uncaught TypeError: Cannot read property 'preferredLineLength' of undefined

At C:\Users\USER\.atom\packages\line-length-break\lib\line-length-break.coffee:9

TypeError: Cannot read property 'preferredLineLength' of undefined
    at Object.breakLines (/packages/line-length-break/lib/line-length-break.coffee:9:45)
    at /packages/line-length-break/lib/line-length-break.coffee:4:8)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.23.2/resources/app/src/command-registry.js:388:36)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.23.2/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.23.2/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.23.2/resources/app/src/window-event-handler.js:108:40)

Commands

     -5:28.7.0 core:confirm (input.hidden-input)
  2x -5:18.3.0 core:backspace (input.hidden-input)
  3x -5:18 core:confirm (input.hidden-input)
     -4:08.1.0 core:cut (input.hidden-input)
     -4:06.4.0 core:paste (input.hidden-input)
  3x -4:06.0 core:confirm (input.hidden-input)
  2x -3:13 window:run-package-specs (input.hidden-input)
  2x -2:59.2.0 core:confirm (input.hidden-input)
  2x -2:33.3.0 core:backspace (input.hidden-input)
     -2:30.9.0 core:confirm (input.hidden-input)
     -1:04.8.0 multi-wrap-guide:line-break (div.multi-wrap-guide.draggable)
     -0:55.4.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:51.6.0 editor:consolidate-selections (input.hidden-input)
     -0:51.6.0 core:cancel (input.hidden-input)
     -0:20.8.0 core:move-down (input.hidden-input)
     -0:19.6.0 line-length-break:break (input.hidden-input)

Non-Core Packages

better-git-blame 0.3.2 
git-diff-details 1.4.0 
git-log 0.4.1 
git-time-machine 1.5.9 
Hydrogen 2.1.1 
language-restructuredtext 1.1.0 
line-length-break 0.4.0 
multi-wrap-guide 1.1.0 (same error after uninstalling this one)
open-path 0.3.6 
rst-preview-pandoc 0.1.12 
teletype 0.5.0 
tree-view-git-status 1.4.0 
zotero-citations 0.19.1 
zotero-picker 1.5.0 
jdpaterson commented 6 years ago

I resolved this by ensuring the proper settings in config.cson: ... editor: preferredLineLength: 100 ...