t9md / atom-vim-mode-plus

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

[atom-core-master-branch] Uncaught TypeError: cursor.getEndOfCurrentWordBufferPosition(...).translate is not a function #907

Closed markovicdenis closed 7 years ago

markovicdenis commented 7 years ago

[Enter steps to reproduce:]

  1. prress E on any word in normal mode

Atom: 1.23.0-dev-26b784d3b x64 Electron: 1.6.14 OS: Mac OS X 10.13.1 Thrown From: vim-mode-plus package 1.9.0

Stack Trace

Uncaught TypeError: cursor.getEndOfCurrentWordBufferPosition(...).translate is not a function

At /Users/denis/.atom/packages/vim-mode-plus/lib/operation-stack.js:160

TypeError: cursor.getEndOfCurrentWordBufferPosition(...).translate is not a function
    at MoveToEndOfWord.moveToNextEndOfWord (/packages/vim-mode-plus/lib/motion.js:474:89)
    at /packages/vim-mode-plus/lib/motion.js:481:12
    at /packages/vim-mode-plus/lib/motion.js:147:7
    at MoveToEndOfWord.countTimes (/packages/vim-mode-plus/lib/base.js:98:7)
    at MoveToEndOfWord.moveCursorCountTimes (/packages/vim-mode-plus/lib/motion.js:146:10)
    at MoveToEndOfWord.moveCursor (/packages/vim-mode-plus/lib/motion.js:479:10)
    at MoveToEndOfWord.moveWithSaveJump (/packages/vim-mode-plus/lib/motion.js:85:10)
    at MoveToEndOfWord.execute (/packages/vim-mode-plus/lib/motion.js:98:14)
    at OperationStack.execute (/packages/vim-mode-plus/lib/operation-stack.js:195:33)
    at OperationStack.process (/packages/vim-mode-plus/lib/operation-stack.js:188:12)
    at OperationStack.run (/packages/vim-mode-plus/lib/operation-stack.js:104:14)
    at /packages/vim-mode-plus/lib/base.js:389:45)
    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:11.7.0 vim-mode-plus:move-to-end-of-word (input.hidden-input)

Non-Core Packages

2-dark-syntax 1.1.0 
apex-syntax 0.2.0 
apex-ui 1.0.1 
atom-beautify 0.30.5 
atom-ide-ui 0.5.0 
atom-ignore 0.2.0 
atom-import-cost 0.9.0 
atom-import-js 0.11.0 
atom-material-syntax 1.0.6 
atom-material-syntax-dark 1.0.0 
atom-stylus-supremacy 0.7.0 
auto-detect-indentation 1.3.0 
autocomplete-js-import 1.4.0 
busy-signal 1.4.3 
chester-atom-syntax 0.3.0 
emmet 2.4.3 
genesis-syntax 1.0.9 
git-diff-details 1.4.0 
git-time-machine 1.5.9 
html2jade-plus 1.0.0 
Hydrogen 1.23.0 
ide-typescript 0.6.1 
improved-chester-atom-syntax 0.3.0 
indent-guide-improved 1.4.13 
intentions 1.1.5 
javascript-refactor 0.5.7 
language-babel 2.75.1 
language-ejs 0.4.0 
language-jade 0.7.2 
language-pug 0.0.21 
language-pug-jade 0.2.0 
linter 2.2.0 
linter-eslint 8.3.2 
linter-less 2.6.0 
linter-lesshint 4.0.1 
linter-pug 1.3.1 
linter-stylelint 4.0.2 
linter-stylint 2.2.8 
linter-ui-default 1.6.10 
material-syntax 0.6.1 
minimap 4.29.7 
minimap-cursorline 0.2.0 
minimap-git-diff 4.3.1 
multifile-rename 0.1.6 
native-ui 0.23.0 
nerd-treeview 0.5.4 
newton-dark-syntax 1.1.9 
oceanic-next 1.0.0 
pigments 0.40.2 
rone-dark-ui 1.10.8 
seti-icons 1.5.4 
spacegray-dark-neue-syntax 1.4.2 
spacegray-eighties-ui 2.0.0 
Stylus 3.1.1 
stylus-language 2.4.6 
todo-show 2.1.0 
tomorrow-night-eighties-syntax 1.0.2 
tomorrow-night-saturated-syntax 0.3.1 
vim-mode 0.66.0 
vim-mode-plus 1.9.0 
wakatime 7.0.3 
yoceanic-next-syntax 0.7.0 
zentabs 0.8.8 
markovicdenis commented 7 years ago

I think this is due to "getEndOfCurrentWordBufferPosition" returnining an regular Object instead of an Point instance..

markovicdenis commented 7 years ago

Anyways, heres how I fixed it on my local version #908 (its probably not the best way, but it works for now)

t9md commented 7 years ago

You use your own build of Atom for master branch? I wont try to fix the issue like this basically. I believe that issue is regression of atom-core, if you can see that function not return instance of Point constantly, open issue on Atom-core. They will definately fix it.

If this issue is left unfixed when 1.23 become new-beta, i will patch then. Unless that many packages breaks not only vmp.

markovicdenis commented 7 years ago

@t9md yeah, its the latest build. I just made this to point out the error, and provide a fix for myself in the meantime..

t9md commented 7 years ago

Pls open the issue to atom-core. Unless you do that i have to open it, I think this proxying is NOT necessary.

markovicdenis commented 7 years ago

@t9md no, haven't opened it yet. I'm not really proficient in opening issues (this is the 2nd issue I've opened on github, overall). Also, not very familiar with atom modules, atom-core...

t9md commented 7 years ago

Ok I will open, thanks for sharing issue.