diff options
author | qkzk <qu3nt1n@gmail.com> | 2024-01-11 22:25:59 +0100 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2024-01-11 22:25:59 +0100 |
commit | 24034b80e9d146aeeb28ecfc8e440fdd39370de4 (patch) | |
tree | 7fe53578e613c629523c83fea3fe3a32aeb120ae | |
parent | ffba90deb7332985362b311cac5f6f7354c8764c (diff) |
WIP. May have to be reversed. Should I create a window kind object and send it actions ?
-rw-r--r-- | development.md | 103 | ||||
-rw-r--r-- | src/event/event_exec.rs | 11 |
2 files changed, 112 insertions, 2 deletions
diff --git a/development.md b/development.md index 6b176f3..73110cd 100644 --- a/development.md +++ b/development.md @@ -861,6 +861,7 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. ### Changelog - [ ] focusable windows + - [x] simple focus enum, mostly following what's being done - [x] allow to change focus, only color the focused window border. - [x] Change focus with ctrl+hjkl @@ -870,9 +871,15 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally. - [ ] Clicking an unfocused window should only give the focus, not execute anything - [ ] give focus with wheel ??? - [ ] dispatch event according to focus + + - send event to window + require to check the focus before picking the action, rewrite every mode logic since they don't apply + - rewrite every action + - [x] movement (up, down, left, rith, pageup, pagedown) - [ ] if second -> menu (requiring moving history to menu ?), else status - [ ] When a menu is opened, it should still be possible to navigate in files and preview or whatever + - [ ] FIX: leaving mount mode with enter when device is mounted should move to it - [ ] display all specific binds for every mode with a key ? - [ ] merge sort & regex, display nb of matches, completion + flag on the fly @@ -975,3 +982,99 @@ or other criteria, with the search results displayed in real-time. Cloud storage integration: TUI file managers can integrate with cloud storage services like Dropbox, Google Drive, or OneDrive, allowing users to manage their cloud files directly from the file manager interface. + +## 0.1.26 : impl focus < mode + +All those action must be checked to ensure the follow the "focus < mode" rule + +- [x] Action, +- [ ] Back, +- [ ] BackTab, +- [ ] Backspace, +- [ ] Bulk, +- [ ] Cd, +- [ ] Chmod, +- [ ] ClearFlags, +- [ ] CliMenu, +- [ ] Compress, +- [ ] Context, +- [ ] CopyFilename, +- [ ] CopyFilepath, +- [ ] CopyPaste, +- [ ] CutPaste, +- [ ] Delete, +- [ ] DeleteFile, +- [ ] DisplayFlagged, +- [ ] EncryptedDrive, +- [ ] End, +- [ ] Enter, +- [ ] Exec, +- [ ] Filter, +- [ ] FlagAll, +- [ ] FocusGoLeft, +- [ ] FocusGoRight, +- [ ] FocusGoDown, +- [ ] FocusGoUp, +- [ ] FuzzyFind, +- [ ] FuzzyFindHelp, +- [ ] FuzzyFindLine, +- [ ] GoRoot, +- [ ] GoStart, +- [ ] Help, +- [ ] History, +- [ ] Home, +- [ ] Jump, +- [ ] KeyHome, +- [ ] LazyGit, +- [ ] Log, +- [ ] MarksJump, +- [ ] MarksNew, +- [ ] MoveDown, +- [ ] MoveLeft, +- [ ] MoveRight, +- [ ] MoveUp, +- [ ] Ncdu, +- [ ] NextSibling, +- [ ] NewDir, +- [ ] NewFile, +- [ ] Nothing, +- [ ] NvimFilepicker, +- [ ] NvimSetAddress, +- [ ] OpenConfig, +- [ ] OpenFile, +- [ ] OpenAll, +- [ ] PageDown, +- [ ] PageUp, +- [ ] Preview, +- [ ] PreviousSibling, +- [ ] Quit, +- [ ] RefreshIfNeeded, +- [ ] RefreshView, +- [ ] RegexMatch, +- [ ] RemoteMount, +- [ ] RemovableDevices, +- [ ] Rename, +- [ ] ResetMode, +- [ ] ReverseFlags, +- [ ] Search, +- [ ] SearchNext, +- [ ] Shell, +- [ ] ShellCommand, +- [ ] TuiMenu, +- [ ] Shortcut, +- [ ] Sort, +- [ ] Symlink, +- [ ] Tab, +- [ ] ToggleDisplayFull, +- [ ] ToggleDualPane, +- [ ] ToggleFlag, +- [ ] ToggleHidden, +- [ ] TogglePreviewSecond, +- [ ] TrashEmpty, +- [ ] TrashMoveFile, +- [ ] TrashOpen, +- [ ] TrashRestoreFile, +- [ ] Tree, +- [ ] TreeFold, +- [ ] TreeFoldAll, +- [ ] TreeUnFoldAll, diff --git a/src/event/event_exec.rs b/src/event/event_exec.rs index 05ac778..b7dcad3 100644 --- a/src/event/event_exec.rs +++ b/src/event/event_exec.rs @@ -1193,8 +1193,15 @@ impl EventAction { /// Enter action mode in which you can type any valid action. /// Some action does nothing as they require to be executed from a specific context. pub fn action(status: &mut Status) -> Result<()> { - status.set_edit_mode(status.index, Edit::InputCompleted(InputCompleted::Action))?; - status.menu.completion.reset(); + if matches!( + status.current_tab().edit_mode, + Edit::InputCompleted(InputCompleted::Action) + ) { + status.reset_edit_mode()?; + } else { + status.set_edit_mode(status.index, Edit::InputCompleted(InputCompleted::Action))?; + status.menu.completion.reset(); + } Ok(()) } |