We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4080c9f commit e11c95eCopy full SHA for e11c95e
1 file changed
crates/emmylua_ls/src/handlers/completion/providers/mod.rs
@@ -156,7 +156,11 @@ fn get_text_edit_range_in_string(
156
}
157
158
if text.ends_with('"') || text.ends_with('\'') {
159
- end_offset -= 1;
+ end_offset = end_offset.saturating_sub(1);
160
+ }
161
+
162
+ if end_offset <= start_offset {
163
+ return None;
164
165
166
let new_text_range = TextRange::new(start_offset.into(), end_offset.into());
0 commit comments