Closed t9md closed 7 years ago
@vinicius0026 I need further clarification.
I want following info for both OK and NG case to understand situation without misunderstanding.
@t9md Sorry for misleading you, but I though I had tried and succeeded replacing other chars by '
or "
(i.e. I thought the error only occurred when replacing these characters), but it really does always occur, regardless of the character being replaced.
So, to make things clear, below are some images and comments on keystrokes, showing all steps to reproduce:
Initial text and cursor position:
Keystrokes: r '
(no space pressed after '
)
Result: exception thrown and t
character replaced by \n
(new line)
If you need futher clarification, please get in touch. Thank you very much for this amazing package and for your work on maintaining it!
OS version (just in case you might need this info): macOS 10.12.6
Pls try v1.11.4 and close if you confirmed it fixed.
@t9md Now it does the replacement correctly, but an exception is still thrown.
Initial text and cursor position:
Keystrokes: r '
Result:
Stack trace:
Uncaught TypeError: Cannot read property 'isComplete' of undefined
at OperationStack.process (/Users/vinicius/.atom/packages/vim-mode-plus/lib/operation-stack.js:180:13)
at ReplaceCharacter.processOperation (/Users/vinicius/.atom/packages/vim-mode-plus/lib/base.js:119:34)
at options.onConfirm (/Users/vinicius/.atom/packages/vim-mode-plus/lib/base.js:134:14)
at confirm (/Users/vinicius/.atom/packages/vim-mode-plus/lib/focus-input.js:37:5)
at editor.buffer.onDidChangeText (/Users/vinicius/.atom/packages/vim-mode-plus/lib/focus-input.js:56:7)
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:25:20)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:141:34)
at TextBuffer.module.exports.TextBuffer.emitDidChangeTextEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1675:28)
at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:975:18)
at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1673:32)
at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1234:30
at TextEditor.module.exports.TextEditor.mergeSelections (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2621:24)
at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2583:41)
at TextEditor.module.exports.TextEditor.mutateSelectedText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1232:25)
at TextEditor.module.exports.TextEditor.insertText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1198:25)
at get_process.nextTick (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:1715:34)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
how is the result with v1.11.5?
@t9md Now it works like a charm! Thank you very much!
Hoo, finally!!
Continue discussion made at https://github.com/t9md/atom-vim-mode-plus/issues/282#issuecomment-337576221
Summary
r '
,r "
,r `
throw exceptionCannot read property 'isComplete' of undefined
.'
,"
,`
chars.|
represent cursor pos).ab|c
toab|'
byr '
ab|c
toab|"
byr "
ab|c
toab|`
byr `
This is my understanding from @vinicius0026's comment below. But I cannot understand why it doesn't throw exception for every attempt to replace to these char. If this issue comes from international keyboard which require extra
space
to type sole'
, it should throw exception regardless of char being replaced.