mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Add verbose logging to debug the #475 issue
This commit is contained in:
parent
93c8d90a51
commit
5f80021321
3 changed files with 12 additions and 6 deletions
10
Cargo.toml
10
Cargo.toml
|
|
@ -2,8 +2,8 @@
|
|||
resolver = "2"
|
||||
members = [ "yazi-*" ]
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
panic = "abort"
|
||||
strip = true
|
||||
# [profile.release]
|
||||
# codegen-units = 1
|
||||
# lto = true
|
||||
# panic = "abort"
|
||||
# strip = true
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ use std::{mem, sync::atomic::Ordering};
|
|||
|
||||
use anyhow::{Ok, Result};
|
||||
use crossterm::event::KeyEvent;
|
||||
use tracing::debug;
|
||||
use yazi_config::keymap::Key;
|
||||
use yazi_core::input::InputMode;
|
||||
use yazi_shared::{emit, event::{Event, Exec, NEED_RENDER}, term::Term, Layer};
|
||||
|
|
@ -29,6 +30,7 @@ impl App {
|
|||
let mut render_in_place = false;
|
||||
while app.signals.rx.recv_many(&mut events, 10).await > 0 {
|
||||
for event in events.drain(..) {
|
||||
debug!("event - do: {:?}", event);
|
||||
match event {
|
||||
Event::Call(exec, layer) => app.dispatch_call(exec, layer),
|
||||
Event::Render => render_in_place = true,
|
||||
|
|
@ -40,6 +42,7 @@ impl App {
|
|||
return Ok(());
|
||||
}
|
||||
}
|
||||
debug!("event - done");
|
||||
}
|
||||
|
||||
if mem::replace(&mut render_in_place, false) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
use std::sync::atomic::Ordering;
|
||||
use std::{backtrace::Backtrace, sync::atomic::Ordering};
|
||||
|
||||
use anyhow::Result;
|
||||
use ratatui::backend::Backend;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::{app::App, lives::Lives, root::{Root, COLLISION}};
|
||||
|
||||
|
|
@ -14,7 +15,9 @@ impl App {
|
|||
let collision = COLLISION.swap(false, Ordering::Relaxed);
|
||||
let frame = term.draw(|f| {
|
||||
Lives::scope(&self.cx, |_| {
|
||||
debug!("rendering: {:?}", Backtrace::force_capture());
|
||||
f.render_widget(Root::new(&self.cx), f.size());
|
||||
debug!("rendered");
|
||||
});
|
||||
|
||||
if let Some((x, y)) = self.cx.cursor() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue