Skip to content

Commit

Permalink
Fix issue after rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasschafer committed Nov 30, 2024
1 parent 1d83cbb commit d3d3014
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ impl App {
});
}

// TODO: why doesn't this work while search (or replacement?) are being completed? Also ignore other keys, i.e. don't allow them to queue up
match (key.code, key.modifiers) {
(KeyCode::Esc, _) | (KeyCode::Char('c'), KeyModifiers::CONTROL) => {
return Ok(EventHandlingResult {
Expand Down Expand Up @@ -642,7 +641,7 @@ impl App {

tokio::spawn(async move {
walker.run(|| {
let parsed_fields = parsed_fields.clone(); // TODO: do we need to clone it?
let parsed_fields = parsed_fields.clone();

Box::new(move |entry| {
let entry = match entry {
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ async fn main() -> anyhow::Result<()> {
while app.running {
let EventHandlingResult { exit, rerender } = tokio::select! {
Some(event) = tui.events.receiver.recv() => {
error!("App event: {:?}", event);
match event {
Event::Key(key_event) => app.handle_key_events(&key_event)?,
Event::App(app_event) => app.handle_app_event(app_event).await,
Expand All @@ -71,7 +70,6 @@ async fn main() -> anyhow::Result<()> {
}
}
Some(event) = app.background_processing_recv() => {
error!("BP event: {:?}", event);
app.handle_background_processing_event(event)}
};

Expand Down
2 changes: 0 additions & 2 deletions src/parsed_fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,9 @@ impl ParsedFields {
line.clone(),
line_number,
) {
// TODO: check the file before reading? Also add tests
if let ContentType::BINARY = inspect(line.as_bytes()) {
continue;
}
error!("Pushing result"); // TODO: remove this and other unneeded logs
let send_result = self
.background_processing_sender
.send(BackgroundProcessingEvent::AddSearchResult(result));
Expand Down
3 changes: 1 addition & 2 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ pub fn line_diff<'a>(old_line: &'a str, new_line: &'a str) -> (Vec<Diff>, Vec<Di
}

fn render_confirmation_view(frame: &mut Frame<'_>, app: &App, rect: Rect) {
error!("Rendering confirmation view");
let [area] = Layout::horizontal([Constraint::Percentage(80)])
.flex(Flex::Center)
.areas(rect);
Expand Down Expand Up @@ -439,7 +438,7 @@ pub fn render(app: &App, frame: &mut Frame<'_>) {
}
};

let additional_keys = if matches!(app.current_screen, CurrentScreen::PerformingReplacement) {
let additional_keys = if matches!(app.current_screen, Screen::PerformingReplacement) {
vec![]
} else {
vec!["<C-r> reset", "<esc> quit"]
Expand Down

0 comments on commit d3d3014

Please sign in to comment.