|
|
|
@ -888,21 +888,6 @@ fn search_selection(cx: &mut Context) {
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
fn select_line(cx: &mut Context) {
|
|
|
|
|
let count = cx.count();
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
|
|
|
|
|
let pos = doc.selection(view.id).primary();
|
|
|
|
|
let text = doc.text();
|
|
|
|
|
|
|
|
|
|
let line = text.char_to_line(pos.head);
|
|
|
|
|
let start = text.line_to_char(line);
|
|
|
|
|
let end = text
|
|
|
|
|
.line_to_char(std::cmp::min(doc.text().len_lines(), line + count))
|
|
|
|
|
.saturating_sub(1);
|
|
|
|
|
|
|
|
|
|
doc.set_selection(view.id, Selection::single(start, end));
|
|
|
|
|
}
|
|
|
|
|
fn extend_line(cx: &mut Context) {
|
|
|
|
|
let count = cx.count();
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|