mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-22 02:22:44 -05:00
feat: Add settings for ignore space and tab in codecompletion char count
This commit is contained in:
@ -152,14 +152,16 @@ void QodeAssistClient::openDocument(TextEditor::TextDocument *document)
|
||||
}
|
||||
|
||||
bool isSpaceOrTab = lastChar[0].isSpace();
|
||||
bool ignoreWhitespace
|
||||
= Settings::codeCompletionSettings().ignoreWhitespaceInCharCount();
|
||||
|
||||
if (!isSpaceOrTab) {
|
||||
if (!ignoreWhitespace || !isSpaceOrTab) {
|
||||
m_recentCharCount += charsAdded;
|
||||
}
|
||||
|
||||
if (m_typingTimer.elapsed()
|
||||
> Settings::codeCompletionSettings().autoCompletionTypingInterval()) {
|
||||
m_recentCharCount = isSpaceOrTab ? 0 : charsAdded;
|
||||
m_recentCharCount = (ignoreWhitespace && isSpaceOrTab) ? 0 : charsAdded;
|
||||
m_typingTimer.restart();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user