Automatically unfollow when editing, scrolling or changing selections

This commit is contained in:
Antonio Scandurra 2022-03-22 09:16:25 +01:00
parent c550fc3f01
commit 3117554568
14 changed files with 214 additions and 60 deletions

View file

@ -102,7 +102,7 @@ impl GoToLine {
) {
match event {
editor::Event::Blurred => cx.emit(Event::Dismissed),
editor::Event::Edited => {
editor::Event::Edited { .. } => {
let line_editor = self.line_editor.read(cx).buffer().read(cx).read(cx).text();
let mut components = line_editor.trim().split(&[',', ':'][..]);
let row = components.next().and_then(|row| row.parse::<u32>().ok());