C14.13: a search hit puts the caret on the match, not the line start

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-12 09:33:02 -04:00
1 parent 584e08d8ad
commit 10b9e7b694
8 files changed
+121 -24

No files matched your search

+6 -4
View File
@@ -186,10 +186,12 @@ impl MarkView {
.collect()
}
/// Line `line` in view and focus.
pub fn reveal(&mut self, line: usize, window: &mut Window, cx: &mut Context<Self>) {
self.document
.update(cx, |document, cx| document.reveal(line, window, cx));
/// Line and column `at` in view and focus, caret there.
pub fn reveal(&mut self, at: (usize, usize), window: &mut Window, cx: &mut Context<Self>) {
self.document.update(cx, |document, cx| {
document.reveal(at.0, window, cx);
document.set_caret(at.0, at.1, cx);
});
}
/// The caret and the view, to keep across launches.