File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -347,15 +347,15 @@ fn calculate_replacement_range(
347347 closing : & ClosingBrace ,
348348) -> Range {
349349 // Start position: move back by the length of the partial text
350- let start_col = position. character . saturating_sub ( partial_len as u32 ) ;
350+ let start_col = position. character . saturating_sub ( u32:: try_from ( partial_len ) . unwrap_or ( 0 ) ) ;
351351 let start = Position :: new ( position. line , start_col) ;
352352
353353 // End position: include auto-paired } if present
354354 let mut end_col = position. character ;
355355 if matches ! ( closing, ClosingBrace :: PartialClose ) {
356356 // Include the auto-paired } in the replacement range
357357 // Check if there's a } immediately after cursor
358- if line_text. len ( ) > cursor_offset && & line_text[ cursor_offset..cursor_offset + 1 ] == "}" {
358+ if line_text. len ( ) > cursor_offset && & line_text[ cursor_offset..= cursor_offset] == "}" {
359359 end_col += 1 ;
360360 }
361361 }
@@ -365,6 +365,7 @@ fn calculate_replacement_range(
365365}
366366
367367/// Generate completions for tag names
368+ #[ allow( clippy:: too_many_arguments) ]
368369fn generate_tag_name_completions (
369370 partial : & str ,
370371 needs_space : bool ,
You can’t perform that action at this time.
0 commit comments