Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
an attempt to fix eturn_to_main (no success)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatFrogDev committed Feb 19, 2024
1 parent 9eb454f commit 2a401ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 63 deletions.
62 changes: 4 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
note::Note,
prompts::{multiselect::multiselect, select::select},
utilities::{cursor_to_origin::cursor_to_origin, truncate_note::truncate_note},
/* return_to_main::return_to_main, */
return_to_main::return_to_main
};
use async_std::path::PathBuf;
use directories::BaseDirs;
Expand Down
1 change: 0 additions & 1 deletion src/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ impl Note {
&inputted_note.created
],
)?;

cursor_to_origin()?;
println!("Note created successfully.");
Ok(())
Expand Down
6 changes: 3 additions & 3 deletions src/return_to_main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crossterm::event;
use crossterm::event::{Event, KeyCode, KeyEvent};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
use crossterm::terminal::{disable_raw_mode, enable_raw_mode};
use std::time::Duration;

Expand All @@ -12,8 +12,8 @@ pub fn return_to_main() -> Result<(), Box<dyn std::error::Error>> {
if let Event::Key(event) = event::read()? {
match event {
KeyEvent {
code: KeyCode::Char('r'),
modifiers: event::KeyModifiers::CONTROL,
code: KeyCode::Char('q'),
modifiers: KeyModifiers::ALT,
kind: _,
state: _,
} => return Ok(()),
Expand Down

0 comments on commit 2a401ab

Please sign in to comment.