You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined
At C:\Program Files\Pulsar\resources\app.asar\node_modules\autocomplete-plus\lib\subsequence-provider.js:136
TypeError: Cannot read property 'getCursorBufferPosition' of undefined
at SubsequenceProvider.bufferToSubsequenceMatches (/app.asar/node_modules/autocomplete-plus/lib/subsequence-provider.js:136:53)
at Array.map (<anonymous>)
at SubsequenceProvider.getSuggestions (/app.asar/node_modules/autocomplete-plus/lib/subsequence-provider.js:258:12)
at /app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:284:52
at Array.forEach (<anonymous>)
at AutocompleteManager.getSuggestionsFromProviders (/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:255:15)
at AutocompleteManager.findSuggestions (/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:247:17)
at AutocompleteManager.requestNewSuggestions (/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:702:12)
at AutocompleteManager.showOrHideSuggestionListForBufferChanges (/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:768:12)
at Function.simpleDispatch (/app.asar/node_modules/event-kit/dist/emitter.js:64:14)
at Emitter.emit (/app.asar/node_modules/event-kit/dist/emitter.js:257:28)
at TextBuffer.emitDidChangeTextEvent (/app.asar/node_modules/text-buffer/lib/text-buffer.js:2374:24)
at TextBuffer.transact (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1337:10)
at TextEditor.transact (/app.asar/src/text-editor.js:2467:24)
at /app.asar/src/text-editor.js:1799:19
at TextEditor.mergeSelections (/app.asar/src/text-editor.js:4053:20)
at TextEditor.mergeIntersectingSelections (/app.asar/src/text-editor.js:4015:10)
at TextEditor.mutateSelectedText (/app.asar/src/text-editor.js:1798:17)
at TextEditor.insertText (/app.asar/src/text-editor.js:1747:25)
at TextEditorComponent.didTextInput (/app.asar/src/text-editor-component.js:1845:24)
It look like the problem is SubsequenceProvider expect that all editors are regirestred to atom.workspace, because then it's try to restore editor from buffer.
The subsequence provider is a barely useful fallback provider used when you don't have something smarter. It just suggests words that have already been typed in the buffer — even less useful when you're in an external editor. If I had my way it wouldn't be enabled at all, so one option would be to disable it for mini editors, or at least have it fail gracefully when it can't find the editor in atom.workspace.
Thanks in advance for your bug report!
What happened?
A package
autocomplete-plus
offers an API called watchEditor to get autocomplete function to external editors, e.g.find-and-replace
->find-container
hydrogen-next
->watch-input
Stack Trace
It look like the problem is SubsequenceProvider expect that all editors are regirestred to
atom.workspace
, because then it's try to restore editor from buffer.I see two possible solutions:
atom.workspace.observeTextEditors
toatom.textEditors.observe
together with this Addatom.textEditors.add
to TE constructor #1190.Pulsar version
1.124.0
Which OS does this happen on?
🪟 Windows
OS details
10
Which CPU architecture are you running this on?
x86_64/AMD64
What steps are needed to reproduce this?
find-and-replace
package.`Autocomplete Search
Additional Information:
atom/autocomplete-plus#872
The text was updated successfully, but these errors were encountered: