Skip to content

Commit

Permalink
save status message
Browse files Browse the repository at this point in the history
  • Loading branch information
Kacperacy committed Mar 10, 2024
1 parent 901deb1 commit b3f098e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ impl Editor {
file.write_all(row.as_bytes()).unwrap();
file.write_all(b"\n").unwrap();
}
self.set_status_message(format!(
"{} bytes written to disk",
file.metadata().unwrap().len()
));
} else {
self.set_status_message("Can't save, no filename".to_string());
}
}
}

0 comments on commit b3f098e

Please sign in to comment.