on master help sign in
helix-view/editor: use SCRATCH_BUFFER_NAME const (#1104)
commit225e7904ec4864b42d0a79f99ebad06ed681c929 authorCole Helbling <cole.e.helbling@outlook.com> dateMon 15 Nov 2021, 08:46 (5 years ago) parentc95cb2b
1 file changed+2−1
helix-view/src/editor.rs+2−1
helix-view/src/editor.rs+2−1
@@ -1,5 +1,6 @@
11use crate::{
22 clipboard::{get_clipboard_provider, ClipboardProvider},
3+ document::SCRATCH_BUFFER_NAME,
34 graphics::{CursorKind, Rect},
45 theme::{self, Theme},
56 tree::{self, Tree},
@@ -427,7 +428,7 @@ impl Editor {
427428 "buffer {:?} is modified",
428429 doc.relative_path()
429430 .map(|path| path.to_string_lossy().to_string())
430− .unwrap_or_else(|| "[scratch]".into())
431+ .unwrap_or_else(|| SCRATCH_BUFFER_NAME.into())
431432 );
432433 }
433434