Skip to content

Commit

Permalink
fixed a few bugs and updated todo list
Browse files Browse the repository at this point in the history
  • Loading branch information
curlpipe committed Jul 16, 2024
1 parent 2bab22d commit c178c8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Cargo.lock
*.swp
*.swo
*.swn
2 changes: 0 additions & 2 deletions .todo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
- [ ] 0.3.3
- [ ] modeline magic
- [ ] glib issues
- [X] stdin input
- [ ] UPDATE AUR PACKAGE
- [ ] Better documentation (particularly around config file)
Expand Down
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use editor::Editor;
use ui::Feedback;

fn main() {
let stdin = cli::get_stdin();
// Interact with user to find out what they want to do
let mut cli = CommandLineInterface::new();

Expand All @@ -25,10 +24,10 @@ fn main() {
return
}

let _ = run(cli, stdin);
let _ = run(cli);
}

fn run(mut cli: CommandLineInterface, stdin: Option<String>) -> Result<()> {
fn run(mut cli: CommandLineInterface) -> Result<()> {
let read_only = cli.read_only();
let config_path = cli.get_config_path();
let file_type = cli.get_file_type();
Expand All @@ -37,7 +36,7 @@ fn run(mut cli: CommandLineInterface, stdin: Option<String>) -> Result<()> {

// Handle stdin if applicable
if cli.stdin() {
if let Some(stdin) = stdin {
if let Some(stdin) = cli::get_stdin() {
editor.blank()?;
let this_doc = editor.doc_len().saturating_sub(1);
let doc = editor.get_doc(this_doc);
Expand Down

0 comments on commit c178c8c

Please sign in to comment.