on master help sign in
helix-term/commands: move SCRATCH_BUFFER_NAME to helix-view/document (#1091)

This way, the name is accessible everywhere `Document` and related types are.

commitb824e091a948c076a428fb981cd5be2929378533 authorCole Helbling <cole.e.helbling@outlook.com> dateFri 12 Nov 2021, 20:15 (5 years ago) parent6d4409c
2 files changed+3−3
helix-term/src/commands.rs+1−3 helix-view/src/document.rs+2
helix-term/src/commands.rs+1−3
@@ -13,7 +13,7 @@ use helix_core::{
1313
1414use helix_view::{
1515 clipboard::ClipboardType,
16− document::Mode,
16+ document::{Mode, SCRATCH_BUFFER_NAME},
1717 editor::{Action, Motion},
1818 input::KeyEvent,
1919 keyboard::KeyCode,
@@ -53,8 +53,6 @@ use grep_searcher::{sinks, BinaryDetection, SearcherBuilder};
5353use ignore::{DirEntry, WalkBuilder, WalkState};
5454use tokio_stream::wrappers::UnboundedReceiverStream;
5555
56−pub const SCRATCH_BUFFER_NAME: &str = "[scratch]";
57−
5856pub struct Context<'a> {
5957 pub register: Option<char>,
6058 pub count: Option<NonZeroUsize>,
helix-view/src/document.rs+2
@@ -25,6 +25,8 @@ const BUF_SIZE: usize = 8192;
2525
2626const DEFAULT_INDENT: IndentStyle = IndentStyle::Spaces(4);
2727
28+pub const SCRATCH_BUFFER_NAME: &str = "[scratch]";
29+
2830#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
2931pub enum Mode {
3032 Normal,