mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Add some logs
This commit is contained in:
parent
011685c624
commit
14d6c96210
1 changed files with 9 additions and 0 deletions
|
|
@ -48,8 +48,14 @@ impl Term {
|
||||||
.map_or(0, |b| b - b'0'),
|
.map_or(0, |b| b - b'0'),
|
||||||
Ordering::Relaxed,
|
Ordering::Relaxed,
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
tracing::error!("Failed to read DA1 response");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::error!("CSI_U: {}", CSI_U.load(Ordering::Relaxed));
|
||||||
|
tracing::error!("BLINK: {}", BLINK.load(Ordering::Relaxed));
|
||||||
|
tracing::error!("SHAPE: {}", SHAPE.load(Ordering::Relaxed));
|
||||||
|
|
||||||
if CSI_U.load(Ordering::Relaxed) {
|
if CSI_U.load(Ordering::Relaxed) {
|
||||||
queue!(
|
queue!(
|
||||||
stderr(),
|
stderr(),
|
||||||
|
|
@ -220,6 +226,7 @@ mod cursor {
|
||||||
impl crossterm::Command for RestoreCursor {
|
impl crossterm::Command for RestoreCursor {
|
||||||
fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result {
|
fn write_ansi(&self, f: &mut impl std::fmt::Write) -> std::fmt::Result {
|
||||||
let shape = SHAPE.load(Ordering::Relaxed);
|
let shape = SHAPE.load(Ordering::Relaxed);
|
||||||
|
tracing::error!("Restoring cursor shape: {}", shape);
|
||||||
match shape {
|
match shape {
|
||||||
1 => SetCursorStyle::BlinkingBlock.write_ansi(f)?,
|
1 => SetCursorStyle::BlinkingBlock.write_ansi(f)?,
|
||||||
2 => SetCursorStyle::SteadyBlock.write_ansi(f)?,
|
2 => SetCursorStyle::SteadyBlock.write_ansi(f)?,
|
||||||
|
|
@ -232,8 +239,10 @@ mod cursor {
|
||||||
|
|
||||||
let blink = BLINK.load(Ordering::Relaxed);
|
let blink = BLINK.load(Ordering::Relaxed);
|
||||||
if blink ^ (shape.max(1) & 1 == 0) {
|
if blink ^ (shape.max(1) & 1 == 0) {
|
||||||
|
tracing::error!("Restoring cursor blink1: {}", blink);
|
||||||
EnableBlinking.write_ansi(f)
|
EnableBlinking.write_ansi(f)
|
||||||
} else {
|
} else {
|
||||||
|
tracing::error!("Restoring cursor blink2: {}", blink);
|
||||||
DisableBlinking.write_ansi(f)
|
DisableBlinking.write_ansi(f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue