mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
update: exit input instaed of change mode for empty input
This commit is contained in:
parent
5e48df5126
commit
4c5778f2c2
1 changed files with 5 additions and 0 deletions
|
|
@ -25,6 +25,11 @@ impl Input {
|
||||||
snap.op = InputOp::None;
|
snap.op = InputOp::None;
|
||||||
}
|
}
|
||||||
InputMode::Insert => {
|
InputMode::Insert => {
|
||||||
|
if snap.value.trim().is_empty() {
|
||||||
|
self.close(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
snap.mode = InputMode::Normal;
|
snap.mode = InputMode::Normal;
|
||||||
self.move_(-1);
|
self.move_(-1);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue