Skip to content

Commit

Permalink
helix-term/commands: move SCRATCH_BUFFER_NAME to helix-view/document (#…
Browse files Browse the repository at this point in the history
…1091)

This way, the name is accessible everywhere `Document` and related types
are.
  • Loading branch information
cole-h authored Nov 13, 2021
1 parent 6d4409c commit b824e09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use helix_core::{

use helix_view::{
clipboard::ClipboardType,
document::Mode,
document::{Mode, SCRATCH_BUFFER_NAME},
editor::{Action, Motion},
input::KeyEvent,
keyboard::KeyCode,
Expand Down Expand Up @@ -53,8 +53,6 @@ use grep_searcher::{sinks, BinaryDetection, SearcherBuilder};
use ignore::{DirEntry, WalkBuilder, WalkState};
use tokio_stream::wrappers::UnboundedReceiverStream;

pub const SCRATCH_BUFFER_NAME: &str = "[scratch]";

pub struct Context<'a> {
pub register: Option<char>,
pub count: Option<NonZeroUsize>,
Expand Down
2 changes: 2 additions & 0 deletions helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const BUF_SIZE: usize = 8192;

const DEFAULT_INDENT: IndentStyle = IndentStyle::Spaces(4);

pub const SCRATCH_BUFFER_NAME: &str = "[scratch]";

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum Mode {
Normal,
Expand Down

0 comments on commit b824e09

Please sign in to comment.