aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorCole Helbling2021-11-15 16:46:39 +0000
committerGitHub2021-11-15 16:46:39 +0000
commit225e7904ec4864b42d0a79f99ebad06ed681c929 (patch)
treeaf2b0a14a08d899371c0e5cae061e7a198291d33 /helix-view
parentc95cb2be28b247d43cd2e10e5da098131818889a (diff)
helix-view/editor: use SCRATCH_BUFFER_NAME const (#1104)
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/editor.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 4712c52a..364865d9 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1,5 +1,6 @@
use crate::{
clipboard::{get_clipboard_provider, ClipboardProvider},
+ document::SCRATCH_BUFFER_NAME,
graphics::{CursorKind, Rect},
theme::{self, Theme},
tree::{self, Tree},
@@ -427,7 +428,7 @@ impl Editor {
"buffer {:?} is modified",
doc.relative_path()
.map(|path| path.to_string_lossy().to_string())
- .unwrap_or_else(|| "[scratch]".into())
+ .unwrap_or_else(|| SCRATCH_BUFFER_NAME.into())
);
}