From f93da455a354f019213315d93bd204a87245b928 Mon Sep 17 00:00:00 2001 From: c-14 Date: Sun, 25 Sep 2022 18:13:38 +0200 Subject: [PATCH] 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. --- src/shell/atuin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shell/atuin.zsh b/src/shell/atuin.zsh index 4e6b76d..ed1c0c1 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