1
0
Fork 0
mirror of https://github.com/helix-editor/helix synced 2024-06-12 20:46:17 +02:00

helix-term/commands: move SCRATCH_BUFFER_NAME to helix-view/document (#1091)

This way, the name is accessible everywhere `Document` and related types
are.
This commit is contained in:
Cole Helbling 2021-11-12 20:15:41 -08:00 committed by GitHub
parent 6d4409c00f
commit b824e091a9
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@
use helix_view::{
clipboard::ClipboardType,
document::Mode,
document::{Mode, SCRATCH_BUFFER_NAME},
editor::{Action, Motion},
input::KeyEvent,
keyboard::KeyCode,
@ -53,8 +53,6 @@
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>,

View File

@ -25,6 +25,8 @@
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,