From 6a8c46a6c4c2185afb49a316d6479ae0d485e1d7 Mon Sep 17 00:00:00 2001 From: able Date: Fri, 15 Sep 2023 21:35:27 -0500 Subject: [PATCH] fixed --- assets/config.rhai | 2 +- src/editor.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/config.rhai b/assets/config.rhai index f08b1b6..3f3c829 100644 --- a/assets/config.rhai +++ b/assets/config.rhai @@ -1,5 +1,5 @@ fn status_bar() { - let sb = `${file_name}:${y}:${x} | ${file_type} | ${line_count}`; + let sb = `${file_name}:${y}:${x} | ${file_type} | ${line_count} Lines`; return sb; } diff --git a/src/editor.rs b/src/editor.rs index bcbb44e..07ec123 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -97,7 +97,7 @@ impl Editor<'static> { pub fn update_scope(&mut self) { self.config .scope - .set_or_push("line_count", self.document.len()); + .set_or_push("line_count", self.document.len() as u64); self.config .scope @@ -394,8 +394,8 @@ impl Editor<'static> { .clone() .unwrap_or("buffer".to_string()), ); - {} - // status = self.config.call("status_bar"); + + status = self.config.call("status_bar"); #[allow(clippy::integer_arithmetic)] let len = status.len();