goto_window_* extends selection (#3985)

* goto_window_* extends selection

* Don't push to the jumplist
pull/4085/head
greg-enbala 2 years ago committed by GitHub
parent b9ff5d0e0a
commit 63ff9309ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -885,8 +885,12 @@ fn goto_window(cx: &mut Context, align: Align) {
.min(last_line.saturating_sub(scrolloff));
let pos = doc.text().line_to_char(line);
doc.set_selection(view.id, Selection::point(pos));
let text = doc.text().slice(..);
let selection = doc
.selection(view.id)
.clone()
.transform(|range| range.put_cursor(text, pos, cx.editor.mode == Mode::Select));
doc.set_selection(view.id, selection);
}
fn goto_window_top(cx: &mut Context) {

Loading…
Cancel
Save