In atom-v1.23.0-beta, many word-motion family broken.
Ultimate cause of why broken is it depends on atom's word motion commands.
e.g. cursor.getBeginningOfCurrentWordBufferPosition.
But these commands are optimized.
And some command no longer continue to find till [0, 0] or EOF.
It's OK, vmp should NOT use these method for different purpose.
This PR is to make vmp's word-motion robust, independent from atom's cursor command so that no longer be broken in future update of Atom.
Done
Most work is done by utils.findWord utility function.
Which doesn't use native cursor's method, it just search buffer to find regex match.
So less chances to be broken on future update of Atom-core 🍻
In atom-v1.23.0-beta, many word-motion family broken. Ultimate cause of why broken is it depends on atom's word motion commands.
cursor.getBeginningOfCurrentWordBufferPosition
.But these commands are optimized. And some command no longer continue to find till [0, 0] or EOF. It's OK, vmp should NOT use these method for different purpose.
This PR is to make vmp's word-motion robust, independent from atom's cursor command so that no longer be broken in future update of Atom.
Done
Most work is done by
utils.findWord
utility function. Which doesn't use native cursor's method, it just search buffer to find regex match. So less chances to be broken on future update of Atom-core 🍻As a result of more independent word position finding, https://github.com/t9md/atom-vim-mode-plus/issues/946 is also fixed in this PR without waiting for atom-core beta update.