diff --git a/crates/oa-desktop/src/app/source_symbols.rs b/crates/oa-desktop/src/app/source_symbols.rs index 66a239ef..c6fef7cc 100644 --- a/crates/oa-desktop/src/app/source_symbols.rs +++ b/crates/oa-desktop/src/app/source_symbols.rs @@ -165,6 +165,10 @@ impl App { && nav::exact_cursor(self.source_workspace.text(), cursor) { self.queue_source_reveal(cursor, false); + // This ticket restores focus to the live editor, not a saved cursor. + // Iced's Cursor omits Word/Line selection kind; moving back to that + // lossy value would collapse an actual word/line selection. + self.source_jump = None; } } @@ -194,13 +198,14 @@ impl App { if self.source_select_line && cursor.selection.is_none() { self.source_editor.perform(text_editor::Action::SelectLine); } - return nav::interaction::guarded_focus( - self.source_editor_id(), - self.source_symbols.raw_interaction.clone(), - raw_interaction, - ); } - Task::none() + // A valid ticket with no jump is focus-only. All intentional navigation + // still takes the cursor branch above, including explicit line selection. + nav::interaction::guarded_focus( + self.source_editor_id(), + self.source_symbols.raw_interaction.clone(), + raw_interaction, + ) } pub(super) fn source_symbol_event(&mut self, event: nav::SymbolEvent) -> Task {