Revert "Return the previous suggestion when replacing it"
This reverts commit 971c88db80
.
This commit is contained in:
parent
b58ac815a8
commit
65fd605b82
3 changed files with 11 additions and 23 deletions
|
@ -2881,11 +2881,9 @@ impl Editor {
|
|||
}
|
||||
|
||||
fn hide_copilot_suggestion(&mut self, cx: &mut ViewContext<Self>) -> bool {
|
||||
let old_suggestion = self
|
||||
.display_map
|
||||
.update(cx, |map, cx| map.replace_suggestion::<usize>(None, cx));
|
||||
|
||||
if old_suggestion.is_some() {
|
||||
if self.has_active_copilot_suggestion(cx) {
|
||||
self.display_map
|
||||
.update(cx, |map, cx| map.replace_suggestion::<usize>(None, cx));
|
||||
cx.notify();
|
||||
true
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue