mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 17:36:19 +04:00
goto_window_* extends selection (#3985)
* goto_window_* extends selection * Don't push to the jumplist
This commit is contained in:
parent
b9ff5d0e0a
commit
63ff9309ce
@ -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…
Reference in New Issue
Block a user