Skip to content

Commit

Permalink
restore get get content string to return result
Browse files Browse the repository at this point in the history
  • Loading branch information
nnh12 committed Dec 6, 2024
1 parent b8c6b0c commit ad9724e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions applications/shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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()
Expand Down

0 comments on commit ad9724e

Please sign in to comment.