diff --git a/Cargo.toml b/Cargo.toml index 979c019..904606a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "calcifer" -version = "1.1.0" +version = "1.0.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 616ef39..aa3fdba 100644 --- a/README.md +++ b/README.md @@ -2,39 +2,44 @@ My custom code editor (only the features I want inside) using egui and my own fork of egui_code_editor https://lib.rs/crates/egui_code_editor +# 0.1.0 : + +Added a File Tree +Added Tabs +Added an Embedded Terminal +Added Syntax Highlighting +Added Themes + +# 0.2.0 : + +Fixed Terminal sterr output +Fixed scroll between tabs +Library subjugation (got the raw files of the egui_code_editor for some internal modifications) + +# 0.3.0 : + +Added find and replace function +Added multi line tab and shift+tab +Added Ctrl+E : comment multiline +Fixed Ctr+Z (was already in library, tried to make my own, and then found the better one) +Added indent recognition (when there is a line break, the indentation level is kept) + + +# 0.4.0 : + +Added testing +Added Ctrl+T : refresh current tab +Added Time debug +Added Tree toggle for performance +Added Alt+Arrows to move through tabs +Added Zoom +Added cd +Added terminal color +Max tabs 8 => 20 +Max framerate => 30 fps (less cpu usage) + # 1.0.0 : -Added a File Tree -Added Tabs -Added an Embedded Terminal -Added Syntax Highlighting -Added Themes -# 1.0.1 : -Fixed Terminal sterr output -Fixed scroll between tabs -Library subjugation (got the raw files of the egui_code_editor for some internal modifications) - -# 1.0.2 : -Added find and replace function -Added multi line tab and shift+tab -Added Ctrl+E : comment multiline -Fixed Ctr+Z (was already in library, tried to make my own, and then found the better one) -Added indent recognition (when there is a line break, the indentation level is kept) - - -# 1.0.3 : -Added testing -Added Ctrl+T : refresh current tab -Added Time debug -Added Tree toggle for performance -Added Alt+Arrows to move through tabs -Added Zoom -Added cd -Added terminal color -Max tabs 8 => 20 -Max framerate => 30 fps (less cpu usage) - -# 1.1.0 : -Added confirm prompt if unsaved -Async terminal ! -Better Ui \ No newline at end of file +Added confirm prompt if unsaved +Async terminal ! +Real Ui \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 8aae48f..77c37f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,7 +56,7 @@ fn main() -> Result<(), eframe::Error> { } eframe::run_native( - &format!("Calcifer v{}{}", tools::version(), TITLE), + &format!("Calcifer{}{}", tools::version(), TITLE), options, Box::new(move |_cc| Box::from(Calcifer::from_app_state(app_state))), ) @@ -233,4 +233,4 @@ impl eframe::App for Calcifer { fn on_exit(&mut self, _gl : std::option::Option<&eframe::glow::Context>) { self.save_state(); } -} \ No newline at end of file +} diff --git a/src/tools/mod.rs b/src/tools/mod.rs index 220d6ae..a906a3c 100644 --- a/src/tools/mod.rs +++ b/src/tools/mod.rs @@ -113,6 +113,9 @@ pub fn format_path(path: &Path) -> String { pub fn version() -> String { // Read the contents of the Cargo.toml file + if !Path::new("Cargo.toml").exists() { + return "".to_string() + } let toml_content = fs::read_to_string("Cargo.toml").expect("Failed to read Cargo.toml"); // Parse the TOML content @@ -123,7 +126,7 @@ pub fn version() -> String { if let Some(version) = package.get("version") { if let Some(version_string) = version.as_str() { println!("Version: {}", version_string); - return version_string.to_string() + return format!(" v{}", version_string) } } } @@ -132,4 +135,4 @@ pub fn version() -> String { #[cfg(test)] -mod tests; \ No newline at end of file +mod tests;