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.
This commit is contained in:
c-14 2022-09-25 18:13:38 +02:00 committed by GitHub
parent 045c87fbcd
commit f93da455a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,7 @@ _atuin_search(){
echoti smkx echoti smkx
if [[ -n $output ]] ; then if [[ -n $output ]] ; then
RBUFFER=""
LBUFFER=$output LBUFFER=$output
fi fi