aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorConnortsui202023-08-08 12:51:34 +0000
committerGitHub2023-08-08 12:51:34 +0000
commitfcbac485f885d90f6341d7acaf75157a01d81892 (patch)
tree21184e39c95cd2b3d4e4a706608bf6584c6b9045 /helix-view/src/editor.rs
parenta7a145ad3d78dc0b9f7c2ea289e07d60d9b51d30 (diff)
Show whether file readonly in statusline (#7740)
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 2152ff9b..113102b6 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -421,6 +421,7 @@ impl Default for StatusLineConfig {
E::Mode,
E::Spinner,
E::FileName,
+ E::ReadOnlyIndicator,
E::FileModificationIndicator,
],
center: vec![],
@@ -473,6 +474,9 @@ pub enum StatusLineElement {
// The file modification indicator
FileModificationIndicator,
+ /// An indicator that shows `"[readonly]"` when a file cannot be written
+ ReadOnlyIndicator,
+
/// The file encoding
FileEncoding,