From a63b4efabc9ba3a24f3468f6c8c51e7fb5025954 Mon Sep 17 00:00:00 2001 From: Arnaud Venturi Date: Mon, 4 Dec 2017 19:23:51 +0100 Subject: [PATCH] Cleanup --- src/widgets.zsh | 56 ----------------------------------------- zsh-autosuggestions.zsh | 56 ----------------------------------------- 2 files changed, 112 deletions(-) diff --git a/src/widgets.zsh b/src/widgets.zsh index e49780d..7461001 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -113,62 +113,6 @@ _zsh_autosuggest_suggest() { } # Accept the entire suggestion -# _zsh_autosuggest_accept() { -# local -i max_cursor_pos=$#BUFFER -# -# # When vicmd keymap is active, the cursor can't move all the way -# # to the end of the buffer -# if [ "$KEYMAP" = "vicmd" ]; then -# max_cursor_pos=$((max_cursor_pos - 1)) -# fi -# -# # Only accept if the cursor is at the end of the buffer -# if [ $CURSOR -eq $max_cursor_pos ]; then -# # Add the suggestion to the buffer -# BUFFER="$BUFFER$POSTDISPLAY" -# -# # Remove the suggestion -# unset POSTDISPLAY -# -# # Move the cursor to the end of the buffer -# CURSOR=${#BUFFER} -# -# print "a" -# _zsh_autosuggest_invoke_original_widget "end-of-line" -# print "b" -# fi -# -# print "1" -# _zsh_autosuggest_invoke_original_widget $@ -# print "2" -# } -# -# # When vicmd keymap is active, the cursor can't move all the way -# # to the end of the buffer -# if [ "$KEYMAP" = "vicmd" ]; then -# max_cursor_pos=$((max_cursor_pos - 1)) -# fi -# -# # Only accept if the cursor is at the end of the buffer -# if [ $CURSOR -eq $max_cursor_pos ]; then -# # Add the suggestion to the buffer -# BUFFER="$BUFFER$POSTDISPLAY" -# -# # Remove the suggestion -# unset POSTDISPLAY -# -# # Move the cursor to the end of the buffer -# CURSOR=${#BUFFER} -# -# print "a" -# _zsh_autosuggest_invoke_original_widget "end-of-line" -# print "b" -# fi -# -# print "1" -# _zsh_autosuggest_invoke_original_widget $@ -# print "2" -# } _zsh_autosuggest_accept() { # Accepting the whole line is basically a specific case of # accepting partially with "end-of-line" widget diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 817f144..3125bab 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -378,62 +378,6 @@ _zsh_autosuggest_suggest() { } # Accept the entire suggestion -# _zsh_autosuggest_accept() { -# local -i max_cursor_pos=$#BUFFER -# -# # When vicmd keymap is active, the cursor can't move all the way -# # to the end of the buffer -# if [ "$KEYMAP" = "vicmd" ]; then -# max_cursor_pos=$((max_cursor_pos - 1)) -# fi -# -# # Only accept if the cursor is at the end of the buffer -# if [ $CURSOR -eq $max_cursor_pos ]; then -# # Add the suggestion to the buffer -# BUFFER="$BUFFER$POSTDISPLAY" -# -# # Remove the suggestion -# unset POSTDISPLAY -# -# # Move the cursor to the end of the buffer -# CURSOR=${#BUFFER} -# -# print "a" -# _zsh_autosuggest_invoke_original_widget "end-of-line" -# print "b" -# fi -# -# print "1" -# _zsh_autosuggest_invoke_original_widget $@ -# print "2" -# } -# -# # When vicmd keymap is active, the cursor can't move all the way -# # to the end of the buffer -# if [ "$KEYMAP" = "vicmd" ]; then -# max_cursor_pos=$((max_cursor_pos - 1)) -# fi -# -# # Only accept if the cursor is at the end of the buffer -# if [ $CURSOR -eq $max_cursor_pos ]; then -# # Add the suggestion to the buffer -# BUFFER="$BUFFER$POSTDISPLAY" -# -# # Remove the suggestion -# unset POSTDISPLAY -# -# # Move the cursor to the end of the buffer -# CURSOR=${#BUFFER} -# -# print "a" -# _zsh_autosuggest_invoke_original_widget "end-of-line" -# print "b" -# fi -# -# print "1" -# _zsh_autosuggest_invoke_original_widget $@ -# print "2" -# } _zsh_autosuggest_accept() { # Accepting the whole line is basically a specific case of # accepting partially with "end-of-line" widget