From ad9724e75a8d133f65817cdc3c858bf3850b265c Mon Sep 17 00:00:00 2001 From: "nathanhsiao123@gmail.com" Date: Thu, 5 Dec 2024 23:38:42 -0500 Subject: [PATCH] restore get get content string to return result --- applications/shell/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/applications/shell/src/lib.rs b/applications/shell/src/lib.rs index 7d4786d53..100a775c6 100644 --- a/applications/shell/src/lib.rs +++ b/applications/shell/src/lib.rs @@ -1446,7 +1446,7 @@ impl Shell { let (_width, height) = self.terminal.lock().get_text_dimensions(); let mut line_end: usize = self.line_start + (height - 20); - if line_end > self.map.len() { + if self.map.len() < line_end { line_end = self.map.len(); } @@ -1461,7 +1461,6 @@ impl Shell { None => return Err("failed to get the byte indices of the last line") }; - info!("{}", self.content.len() - 1); self.terminal.lock().clear(); self.terminal.lock().print_to_terminal( self.content[start_indices.start..end_indices.end].to_string()