mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
empty check should not be ignored
This commit is contained in:
parent
5ba632b6f9
commit
8f414a4c6b
1 changed files with 2 additions and 0 deletions
|
|
@ -43,6 +43,8 @@ impl Input {
|
|||
snap.cursor.saturating_sub(limit / 2).min(snap.len().saturating_sub(limit.saturating_sub(1)));
|
||||
if snap.offset != offset {
|
||||
snap.offset = offset;
|
||||
} else if snap.value.is_empty() {
|
||||
snap.offset = 0;
|
||||
} else {
|
||||
let delta = snap.mode.delta();
|
||||
let s = snap.slice(snap.offset..snap.cursor + delta);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue