|
1 | 1 | use crate::interactive::state::FilesystemScan; |
2 | 2 | use crate::interactive::{ |
| 3 | + CursorDirection, CursorMode, DisplayOptions, EntryCheck, MarkEntryMode, |
3 | 4 | app::navigation::Navigation, |
4 | 5 | state::FocussedPane, |
5 | | - widgets::{glob_search, MainWindow, MainWindowProps}, |
6 | | - CursorDirection, CursorMode, DisplayOptions, EntryCheck, MarkEntryMode, |
| 6 | + widgets::{MainWindow, MainWindowProps, glob_search}, |
7 | 7 | }; |
8 | 8 | use anyhow::Result; |
9 | 9 | use crossbeam::channel::Receiver; |
10 | 10 | use crosstermion::crossterm::event::{KeyCode, KeyEvent, KeyEventKind, KeyModifiers}; |
11 | 11 | use crosstermion::input::Event; |
12 | 12 | use dua::{ |
13 | | - traverse::{BackgroundTraversal, EntryData, Traversal, TreeIndex}, |
14 | 13 | WalkResult, |
| 14 | + traverse::{BackgroundTraversal, EntryData, Traversal, TreeIndex}, |
15 | 15 | }; |
16 | 16 | use std::path::PathBuf; |
17 | | -use tui::{backend::Backend, buffer::Buffer, layout::Rect, widgets::Widget, Terminal}; |
| 17 | +use tui::{Terminal, backend::Backend, buffer::Buffer, layout::Rect, widgets::Widget}; |
18 | 18 |
|
19 | 19 | use super::state::{AppState, Cursor}; |
20 | 20 | use super::tree_view::TreeView; |
@@ -232,8 +232,8 @@ impl AppState { |
232 | 232 | where |
233 | 233 | B: Backend, |
234 | 234 | { |
235 | | - use crosstermion::crossterm::event::KeyCode::*; |
236 | 235 | use FocussedPane::*; |
| 236 | + use crosstermion::crossterm::event::KeyCode::*; |
237 | 237 |
|
238 | 238 | let key = match event { |
239 | 239 | Event::Key(key) if key.kind != KeyEventKind::Release => { |
@@ -275,7 +275,7 @@ impl AppState { |
275 | 275 | Char('c') if key.modifiers.contains(KeyModifiers::CONTROL) && !glob_focussed => { |
276 | 276 | return Ok(Some(WalkResult { |
277 | 277 | num_errors: self.stats.io_errors, |
278 | | - })) |
| 278 | + })); |
279 | 279 | } |
280 | 280 | _ => { |
281 | 281 | handled = false; |
@@ -386,10 +386,10 @@ impl AppState { |
386 | 386 | }); |
387 | 387 |
|
388 | 388 | // If we are displaying the root of the glob search results then cancel the search. |
389 | | - if let Some(glob_tree_root) = tree.glob_tree_root { |
390 | | - if glob_tree_root == self.navigation().view_root { |
391 | | - self.quit_glob_mode(tree, window) |
392 | | - } |
| 389 | + if let Some(glob_tree_root) = tree.glob_tree_root |
| 390 | + && glob_tree_root == self.navigation().view_root |
| 391 | + { |
| 392 | + self.quit_glob_mode(tree, window) |
393 | 393 | } |
394 | 394 |
|
395 | 395 | let (paths, remove_root_node, skip_root, use_root_path, index, parent_index) = match what { |
|
0 commit comments