Honor setting the selected range in addition to marking text
This commit is contained in:
parent
f712dec4c0
commit
eda60effed
3 changed files with 10 additions and 4 deletions
|
@ -5922,7 +5922,7 @@ impl View for Editor {
|
|||
&mut self,
|
||||
range: Option<Range<usize>>,
|
||||
text: &str,
|
||||
_new_selected_range: Option<Range<usize>>,
|
||||
new_selected_range: Option<Range<usize>>,
|
||||
cx: &mut ViewContext<Self>,
|
||||
) {
|
||||
self.transact(cx, |this, cx| {
|
||||
|
@ -5948,6 +5948,10 @@ impl View for Editor {
|
|||
);
|
||||
|
||||
this.handle_input(text, cx);
|
||||
|
||||
if let Some(new_selected_range) = new_selected_range {
|
||||
this.set_selected_text_range(new_selected_range, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue