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
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
FuzzyProvider Should Remove Words Which Are No Longer In Any Open Buffer #196
changed the title [-]Can't autocomplete changed word, can't remove word with typo, some words not added.[/-][+]FuzzyProvider Should Remove Words Which Are No Longer In Any Open Buffer[/+]on Jan 19, 2015
I think this is a bug. Also the new title doesn't reflect that changed words and words in end of line aren't added. But maybe that should be filed in a different issue?
Bug or enhancement, it doesn't change anything :) Reality is the current FuzzyProvider implementation is a holdover from autocomplete, and needs significant enhancement to be more useful. If you would like to open additional issues feel free, or edit this issue to describe the use cases you'd like covered by a set of tests so we can lock in the behavior.
As far as I can tell from the code, saving the open buffer should cause the word list to be rebuilt. If that doesn't remove the extraneous suggestion, we have an issue. I'm a little hesitant to rebuilt the word list in a single buffer continuously, so despite having a test for this that reliably reproduces it, I'm not sure the fix should be put in place for performance reasons. Thoughts @park9140?
it"removes words from the wordlist when they no longer exist in any open buffers", ->provider=autocompleteManager.providerManager.fuzzyProviderexpect(provider.wordList.indexOf("bogos")).toEqual(-1)
editor.insertText("bogos = 1")
editor.insertText("")
expect(provider.wordList.indexOf("bogos")).not.toEqual(-1)
expect(provider.wordList.indexOf("bogus")).toEqual(-1)
editor.backspace() for [1..7]
editor.insertText("us = 1")
editor.insertText("")
expect(provider.wordList.indexOf("bogus")).not.toEqual(-1)
expect(provider.wordList.indexOf("bogos")).toEqual(-1)
Activity
joefitzgerald commentedon Jan 19, 2015
What is the filetype of the file you opened prior to typing
bogos = 1? We will create a test and then fix in #186.DiThi commentedon Jan 19, 2015
No type, just creating a new empty document. It also happened to me with CoffeeScript and Python.
joefitzgerald commentedon Jan 19, 2015
Got it. Thanks!
[-]Can't autocomplete changed word, can't remove word with typo, some words not added.[/-][+]FuzzyProvider Should Remove Words Which Are No Longer In Any Open Buffer[/+]DiThi commentedon Jan 19, 2015
I think this is a bug. Also the new title doesn't reflect that changed words and words in end of line aren't added. But maybe that should be filed in a different issue?
joefitzgerald commentedon Jan 19, 2015
Bug or enhancement, it doesn't change anything :) Reality is the current FuzzyProvider implementation is a holdover from
autocomplete, and needs significant enhancement to be more useful. If you would like to open additional issues feel free, or edit this issue to describe the use cases you'd like covered by a set of tests so we can lock in the behavior.joefitzgerald commentedon Jan 24, 2015
As far as I can tell from the code, saving the open buffer should cause the word list to be rebuilt. If that doesn't remove the extraneous suggestion, we have an issue. I'm a little hesitant to rebuilt the word list in a single buffer continuously, so despite having a test for this that reliably reproduces it, I'm not sure the fix should be put in place for performance reasons. Thoughts @park9140?
Build Test To Reproduce #196
park9140 commentedon Jan 24, 2015
@joefitzgerald , honestly, I don't think we should continuously rebuild, this scan already drastically drops performance in large files.