Commit Graph

10 Commits (c6da158bb6b2b3d823d52699528be886dd344fa8)

Author SHA1 Message Date
Nefo Fortressia c6da158bb6
feat: implement saving file normally
Merge branch 'feat/save' of https://gitea.treehouse.systems/fortressia/echidna

See #21
2021-12-27 21:03:08 +07:00
Nefo Fortressia 9b99932fdd
refactor: use match when processing EchidnaCoreEditor's initial file
Just like in 8e31be7.
2021-12-18 17:29:39 +07:00
Nefo Fortressia 5e574299f3 Merge branch 'main' into 'feat/save'
# Conflicts:
#   src/components/window/file.rs
2021-12-18 04:53:27 +00:00
Nefo Fortressia 52d1bdf7db
refactor: move the code for saving files to EchidnaCoreEditor
Additionally add support for normal saving ("Save File").

This change gives support for saving files other than the current one.

EchidnaWindow.save_file_as() was only able to save the current tab opened.
2021-12-16 14:04:53 +07:00
Nefo Fortressia b9a0719750
refactor: migrate panic!() usage to Rust 2021
This commit refactors code to conform to some changes in Rust 2021:
- The panic!() macro now uses format_args!() like println!().
- The usage of panic!(x) is now deprecated if x is not a string literal.

See:
https://doc.rust-lang.org/nightly/edition-guide/rust-2021/panic-macro-consistency.html
2021-12-13 11:25:10 +07:00
Nefo Fortressia 1b9f20b648 refactor: switch to .expect() from match
Using .expect() for Options and Results add more readability to the
code.
2021-11-01 13:57:04 +07:00
Nefo Fortressia d68a8a8994 style: format files with Rustfmt 2021-10-31 17:00:56 +07:00
Nefo Fortressia 390485b3b1 feat: implement win.save-file-as action 2021-10-31 16:58:20 +07:00
Nefo Fortressia 48f63a88ea style: format codebase with cargo fmt 2021-10-29 09:44:36 +07:00
Nefo Fortressia 6144feb857 refactor: move editor code to a separate EchidnaCoreEditor widget
This allows for a more component-based codebase, like those in web development.

Also added barebone minimap and refactored the file loading.

Should have commited them in a separate commit, but I'm just used to overusing git add -p.
2021-10-28 17:17:27 +07:00