Cleanup
This commit is contained in:
		
							parent
							
								
									8c0998d232
								
							
						
					
					
						commit
						a63b4efabc
					
				|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue