Commit 4af56f54 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Use doc->characterAt() instead of doc->text()

parent 867625ec
...@@ -290,10 +290,9 @@ public: ...@@ -290,10 +290,9 @@ public:
/** /**
* @brief return next char *after* the range * @brief return next char *after* the range
*/ */
static QString peekNextChar(KTextEditor::Document* doc, const KTextEditor::Range& range) static QChar peekNextChar(KTextEditor::Document* doc, const KTextEditor::Range& range)
{ {
auto n = doc->text(KTextEditor::Range(range.end().line(), range.end().column(), range.end().line(), range.end().column() + 1 )); return doc->characterAt(KTextEditor::Cursor(range.end().line(), range.end().column()));
return n;
} }
void executeCompletionItem(KTextEditor::View *view, const KTextEditor::Range &word, const QModelIndex &index) const override void executeCompletionItem(KTextEditor::View *view, const KTextEditor::Range &word, const QModelIndex &index) const override
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment