On Fri, 17 Dec 2010 17:23:32 +0100, Vincent Renaudineau <[email protected]> wrote: > Hi ! > > I have a strange behaviour when using autoCompleteFromAll with my custom > lexer : keywords are displayed twice ! > > Indeed, they are in my API, and in my document. > So when I want autocomplete "impo" (for "import"), it finds "import" in > the API and in the document. > > The problem come from QsciAPIs::updateAutoCompletionList() > qsciapis.cpp, line 445-453 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > // Get the word we are interested in (ie. the one after the > // current origin in path). > QString w = base.mid(origin_len + wsep.length()).split(wsep).first(); > > // Append the space, we know the origin is unambiguous. > w.append(' '); > > if (!list.contains(w)) > list << w; > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > It appends a whitespace so "import " is different of "import" when it > searches if "import" is not already in wlist in > QsciScintilla::startAutoCompletion(). > > I propose to remove the whitespace at a time, or had a whitespace for > the comparison. > > Thanks
Should be fixed in tonight's snapshot. Thanks, Phil _______________________________________________ QScintilla mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/qscintilla
