Skip to content

Commit

Permalink
Fix code generation for suggestion preview (#6054)
Browse files Browse the repository at this point in the history
Fix a stupid typo introduced in #5770. It affected the code generated by CB while previewing suggestions.
  • Loading branch information
vitvakatu authored Mar 23, 2023
1 parent ca0779c commit de008eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/gui/src/controller/searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ impl Searcher {
debug!("Previewing suggestion: \"{picked_suggestion:?}\".");
self.clear_temporary_imports();

let has_this = self.this_var().is_none();
let has_this = self.this_var().is_some();
let preview_change =
self.data.borrow().input.after_inserting_suggestion(&picked_suggestion, has_this)?;
let preview_ast = self.ide.parser().parse_line_ast(preview_change.new_input).ok();
Expand Down

0 comments on commit de008eb

Please sign in to comment.