accodeing / copy-with-style

An Atom package that allows you to copy syntax highlighted code to the clipboard.
MIT License
7 stars 11 forks source link

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

Closed bvsbrk closed 2 years ago

bvsbrk commented 5 years ago

Stack Trace

Uncaught TypeError: Cannot read property 'onDidUpdateState' of undefined

At .atom\packages\copy-with-style\lib\atom_editor.js:58

TypeError: Cannot read property 'onDidUpdateState' of undefined
    at Editor.process_lines (/packages/copy-with-style/lib/atom_editor.js:58:70)
    at HTMLgenerator.generate (/packages/copy-with-style/lib/html_generator.js:58:45)
    at Object.copy (/packages/copy-with-style/lib/main.js:58:68)
    at HTMLElement.copyWithStylePreset1 (/packages/copy-with-style/lib/main.js:19:45)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.31.1/resources/app/src/command-registry.js:384:49)
    at Object.didConfirmSelection (~/AppData/Local/atom/app-1.31.1/resources/app/node_modules/command-palette/lib/command-palette-view.js:152:35)
    at SelectListView.confirmSelection (~/AppData/Local/atom/app-1.31.1/resources/app/node_modules/atom-select-list/src/select-list-view.js:413:26)
    at HTMLDivElement.core:confirm (~/AppData/Local/atom/app-1.31.1/resources/app/node_modules/atom-select-list/src/select-list-view.js:118:20)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.31.1/resources/app/src/command-registry.js:384:49)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.31.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.31.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.31.1/resources/app/src/window-event-handler.js:110:40)

Commands

     -0:16.6.0 command-palette:toggle (input.hidden-input)
     -0:13.7.0 core:confirm (input.hidden-input)
     -0:13.7.0 copy-with-style:preset1 (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
atom-clock 0.1.16 
auto-save-on-idle 1.2.1 
copy-with-style 1.1.0 
firacode 0.3.0 
formatter-clangformat 1.0.1 
gpp-compiler 3.0.7 
daron4ever commented 5 years ago

I have this error after I changed Line 21. this.lines = new Array( this.editor.buffer.getLines().length );

Regards,

ghost commented 5 years ago

Same here, error occurs after applying fix to #6.