From 8880bf2e8fb8a624deb3a7c463fb9dee60535e22 Mon Sep 17 00:00:00 2001 From: Andrei Stan Date: Thu, 4 Jan 2024 20:20:04 +0200 Subject: [PATCH] Move left when exiting insert mode Signed-off-by: Andrei Stan --- src/edit_mode/vi/.mod.rs.swp | Bin 0 -> 16384 bytes src/edit_mode/vi/mod.rs | 6 +++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 src/edit_mode/vi/.mod.rs.swp diff --git a/src/edit_mode/vi/.mod.rs.swp b/src/edit_mode/vi/.mod.rs.swp new file mode 100644 index 0000000000000000000000000000000000000000..b7febe2dccaace3cfd5ba9ba4d1b8867790c37af GIT binary patch literal 16384 zcmeI2ON<;x8OO_Uh+~Koi-=RCs1`?LMjH2oBvPVwb^)z-VP)@b@NP^{0+XJe8c#7j z-Q%vF+1=R7BjO=$LE<6c5C@PC1SBpAf{Td+1Q5qW9CC>A5>k**q>#Xc$N#J9p6Q;K z*T@P&s+N8`Gu>a;<6mEWU0-e2?>N1(%I|gVWH=5pcHqr#i|3smU-PLSGUkPiSV+1s z`!IG#8$z{{s5{;E^Tx2+^!%#di&Za{)wrjUYAi$}kfErm*sqF)OlqB|A*y{@#itXi z=|$QrRspNPo)tL6?z;2CcaZs!56urJwsoKL4E_52xqbBiH|xUSCSjKR0qc{b@g}0#*U5fK|XMU=^?m zSOu&CRspMkRlq7>75E=0;58WIsP{EW`0@Y$EdPJ&CdU2@UIfp9--53K2OI^5zzyK< zH!}7H_z5@**1<_|0^AA?gKNP*4l(u)cpE$eE`rBF8!Usn!A;=x8yNcq_&In6TmWAI z+u$DX&ifeq6L=bY7xX|I2;hS{co5tMe*a#^ehIz@9tEEU>tF?Z94vz>c>N$_zXKP+ zW8efh2wu3JvFE`>@F=(k%z^#j$pegSf;qszE7w6I@EfoLw!sN-3;4@>&|Yv3d<4t^ z4qm*Lv8TY-K?~dqZUy_m3;P+n1bzzI-~-@oY|{J;JOCB|joGW&Mh%)V?cfuRYL&0b zZPDO(!$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E+D6+{C_D;B40voe+fJRwm<;d;FI7mcojMQv)}^w7WgJu0cCIy{1dtS8{k*q68IYU z68IuWz!JC)P`>|b@FVaT*aCg5-z(GJc{`bKSco3|DlVBfs8U242JPm#Tw!s!y1|J2a&pfb)Rlq7>6|f3e z1*`(2X`iQPC$lEb&Xur-gM@Fmj?)Vlv*(!Ku}QakV2a$lFCD#LNpn=8{M`PH(+js^ zubbc5E0>F#Em#8%Rz;`^J0ND!NDEv#a6PxJdi&YibEyzD1Qntc*>XQydAhD2g?;K* z6D!$L+7XmB$iGcqHQaYd7s95}J*2<+WP&83%(U3@Ny$ZS1zI$olw{0Ypym@Y(t)9O6r-c$m{BNqZj z1}x{jj@KCOQ!=`fj?DRUhF9R`!@Fu*GHKOROEz_~dR6_M{=Ko`$3leflGk50jtcAa bSJUZ-13c693#yaz7G1wMYD3plMbG~ai?_1h literal 0 HcmV?d00001 diff --git a/src/edit_mode/vi/mod.rs b/src/edit_mode/vi/mod.rs index 4428c645..f5971ac8 100644 --- a/src/edit_mode/vi/mod.rs +++ b/src/edit_mode/vi/mod.rs @@ -137,7 +137,11 @@ impl EditMode for Vi { (_, KeyModifiers::NONE, KeyCode::Esc) => { self.cache.clear(); self.mode = ViMode::Normal; - ReedlineEvent::Multiple(vec![ReedlineEvent::Esc, ReedlineEvent::Repaint]) + ReedlineEvent::Multiple(vec![ + ReedlineEvent::Left, + ReedlineEvent::Esc, + ReedlineEvent::Repaint, + ]) } (_, KeyModifiers::NONE, KeyCode::Enter) => { self.mode = ViMode::Insert;