Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
4af56f54
Commit
4af56f54
authored
Jan 20, 2021
by
Waqar Ahmed
Committed by
Christoph Cullmann
Jan 21, 2021
Browse files
Use doc->characterAt() instead of doc->text()
parent
867625ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/lspclient/lspclientcompletion.cpp
View file @
4af56f54
...
...
@@ -290,10 +290,9 @@ public:
/**
* @brief return next char *after* the range
*/
static
Q
String
peekNextChar
(
KTextEditor
::
Document
*
doc
,
const
KTextEditor
::
Range
&
range
)
static
Q
Char
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
n
;
return
doc
->
characterAt
(
KTextEditor
::
Cursor
(
range
.
end
().
line
(),
range
.
end
().
column
()));
}
void
executeCompletionItem
(
KTextEditor
::
View
*
view
,
const
KTextEditor
::
Range
&
word
,
const
QModelIndex
&
index
)
const
override
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment