Skip to content
Snippets Groups Projects
Commit cd50d818 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Attempt to fix a crash

parent 84896672
Branches
Tags
No related merge requests found
...@@ -61,7 +61,8 @@ class Editor( ...@@ -61,7 +61,8 @@ class Editor(
val end = Math.min( val end = Math.min(
s.length, previous.range.start + previous.completion.name.length + suffix.length s.length, previous.range.start + previous.completion.name.length + suffix.length
) )
val sequence = s.substring(previous.range.start, end) val sequence = if (end > previous.range.start) "" else s.substring(previous.range.start,
end)
if (sequence == previous.completion.name + suffix) { if (sequence == previous.completion.name + suffix) {
previous.originalWord to (previous.range.start until end) previous.originalWord to (previous.range.start until end)
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment