aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorc-14 <git@c-14.de>2022-09-25 18:13:38 +0200
committerGitHub <noreply@github.com>2022-09-25 09:13:38 -0700
commitf93da455a354f019213315d93bd204a87245b928 (patch)
tree0a68515a2e5a878c61bc9e41581c4054822d0f16
parentAllow stateless commands to be run without config/database (#544) (diff)
downloadatuin-f93da455a354f019213315d93bd204a87245b928.zip
Clear RBUFFER when accepting output from atuin (#545)
Since we pass $BUFFER to atuin search, retaining RBUFFER (the part of the buffer to the right of the cursor) probably doesn't make sense. The advantage of setting RBUFFER and LBUFFER separately instead of setting BUFFER is that the cursor is positioned after the end of LBUFFER instead of remaining where it was before atuin was called.
-rw-r--r--src/shell/atuin.zsh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shell/atuin.zsh b/src/shell/atuin.zsh
index 4e6b76d9..ed1c0c16 100644
--- a/src/shell/atuin.zsh
+++ b/src/shell/atuin.zsh
@@ -38,6 +38,7 @@ _atuin_search(){
echoti smkx
if [[ -n $output ]] ; then
+ RBUFFER=""
LBUFFER=$output
fi