t9md / atom-vim-mode-plus

vim-mode improved
https://atom.io/packages/vim-mode-plus
MIT License
1.4k stars 111 forks source link

`zc` (fold current row) stopped working #919

Closed tadams42 closed 6 years ago

tadams42 commented 6 years ago

Hi there,

zc throws Uncaught TypeError: this.modifyFoldForRow is not a function. I believe this fixes it (lib/misc-command.js):

// zc
class FoldCurrentRow extends MiscCommand {
  execute() {
    for (const point of this.getCursorBufferPositions()) {
-      this.modifyFoldForRow(point.row)
+      this.editor.modifyFoldForRow(point.row)
    }
  }
}
FoldCurrentRow.register()

I can provide detailed stack trace etc, if above assumption is wrong...

t9md commented 6 years ago

Thanks for reporting!