t9md / atom-vim-mode-plus

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

Uncaught TypeError: _this.limitNumber is not a function #982

Closed easadler closed 6 years ago

easadler commented 6 years ago

I thought that it went away, but it came back when I switched branches. After restarting atom the error went away.

[Enter steps to reproduce:]

  1. Upgraded library to 1.21 2 press i on the keyboard

Atom: 1.22.1 x64 Electron: 1.6.15 OS: Mac OS X 10.11.6 Thrown From: vim-mode-plus package 1.21.0

Stack Trace

Uncaught TypeError: _this.limitNumber is not a function

At /Users/esadler/.atom/packages/vim-mode-plus/lib/operation-stack.js:151

TypeError: _this.limitNumber is not a function
    at /packages/vim-mode-plus/lib/operator-insert.js:76:64
    at ActivateInsertMode.execute (/packages/vim-mode-plus/lib/operator-insert.js:128:45)
    at OperationStack.execute (/packages/vim-mode-plus/lib/operation-stack.js:187:33)
    at OperationStack.process (/packages/vim-mode-plus/lib/operation-stack.js:180:12)
    at OperationStack.run (/packages/vim-mode-plus/lib/operation-stack.js:96:14)
    at /packages/vim-mode-plus/lib/base.js:911:35)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:381:36)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:3:65)

Commands

     -0:04.5.0 vim-mode-plus:activate-insert-mode (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.6 
atom-typescript 11.0.10 
busy-signal 1.4.3 
intentions 1.1.5 
linter 2.2.0 
linter-eslint 8.4.0 
linter-flake8 2.2.1 
linter-ui-default 1.6.10 
markdown-preview-plus 2.4.16 
prettier-atom 0.41.0 
vim-mode-plus 1.21.0 
t9md commented 6 years ago

I thought that it went away, but it came back when I switched branches. After restarting atom the error went away.

What do you mean? You saw same error in older version? Switched branch means upgraded vmp to 1.21.0 right? After restarting and went away, it's OK, basically you need to restart on each upgrade.

easadler commented 6 years ago

sorry for the confusion. I thought I had restarted atom and got it working, but then the error came back when I changed branches or projects...can’t remember.

Not really a problem, but other packages upgraded without needing the restart.

t9md commented 6 years ago

ya, in vmp sometime don't require restart, but sometime need. As far as I understand, upgrading package doesn't invalidate require.cache, so when I introduce BIG change which involve require graph change, need restart.

Basically I want to say need restart always as Atom's pkg manager suggests!!.