From 4076e35a2f8d0027fe99c7dfd59f29c48ea5e389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E9=9B=85=20misaki=20masa?= Date: Fri, 30 May 2025 18:50:00 +0800 Subject: [PATCH] fix: `forward --end-of-word` of the input should consider the mode's delta (#2811) --- yazi-widgets/src/input/commands/forward.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-widgets/src/input/commands/forward.rs b/yazi-widgets/src/input/commands/forward.rs index 2858dc28..32bb326f 100644 --- a/yazi-widgets/src/input/commands/forward.rs +++ b/yazi-widgets/src/input/commands/forward.rs @@ -31,7 +31,7 @@ impl Input { if b && !matches!(snap.op, InputOp::None | InputOp::Select(_)) { return self.r#move(i as isize); } else if b { - return self.r#move(if opt.end_of_word { i - 1 } else { i } as isize); + return self.r#move(if opt.end_of_word { i - snap.mode.delta() } else { i } as isize); } prev = k; }