Unify visual line_mode and non line_mode operators

This commit is contained in:
Keith Simmons
2022-05-26 17:02:05 -07:00
parent 11569a869a
commit e93c49f4f0
12 changed files with 141 additions and 178 deletions
+1 -2
View File
@@ -1,9 +1,8 @@
use editor::{ClipboardSelection, Editor};
use gpui::{ClipboardItem, MutableAppContext};
use language::Point;
pub fn copy_selections_content(editor: &mut Editor, linewise: bool, cx: &mut MutableAppContext) {
let selections = editor.selections.all::<Point>(cx);
let selections = editor.selections.all_adjusted(cx);
let buffer = editor.buffer().read(cx).snapshot(cx);
let mut text = String::new();
let mut clipboard_selections = Vec::with_capacity(selections.len());