From 16eab47f75a2d3d6bd3a0aeae116676c55aa770f Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 30 May 2025 18:42:16 +0800 Subject: [PATCH] fix: `forward --end-of-word` of the input should consider the mode's delta --- 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; }