on master help sign in
helix-term/commands: move SCRATCH_BUFFER_NAME to helix-view/document (#1091)
b824e09Cole Helbling
helix-term/src/commands.rs+1−3
@@ -13,7 +13,7 @@ use helix_core::{
13
13
14use helix_view::{
14use helix_view::{
15 clipboard::ClipboardType,
15 clipboard::ClipboardType,
16− document::Mode,
16+ document::{Mode, SCRATCH_BUFFER_NAME},
17 editor::{Action, Motion},
17 editor::{Action, Motion},
18 input::KeyEvent,
18 input::KeyEvent,
19 keyboard::KeyCode,
19 keyboard::KeyCode,
@@ -53,8 +53,6 @@ use grep_searcher::{sinks, BinaryDetection, SearcherBuilder};
53use ignore::{DirEntry, WalkBuilder, WalkState};
53use ignore::{DirEntry, WalkBuilder, WalkState};
54use tokio_stream::wrappers::UnboundedReceiverStream;
54use tokio_stream::wrappers::UnboundedReceiverStream;
55
55
56−pub const SCRATCH_BUFFER_NAME: &str = "[scratch]";
57−
58pub struct Context<'a> {
56pub struct Context<'a> {
59 pub register: Option<char>,
57 pub register: Option<char>,
60 pub count: Option<NonZeroUsize>,
58 pub count: Option<NonZeroUsize>,
helix-view/src/document.rs+2
@@ -25,6 +25,8 @@ const BUF_SIZE: usize = 8192;
25
25
26const DEFAULT_INDENT: IndentStyle = IndentStyle::Spaces(4);
26const DEFAULT_INDENT: IndentStyle = IndentStyle::Spaces(4);
27
27
28+pub const SCRATCH_BUFFER_NAME: &str = "[scratch]";
29+
28#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
30#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
29pub enum Mode {
31pub enum Mode {
30 Normal,
32 Normal,