do not try to surround a selection if nothing is selected

This commit is contained in:
Dominik Honnef 2009-06-27 17:57:41 +02:00
parent 291fd530d5
commit 32de892fa1

View file

@ -156,6 +156,11 @@ module Diakonos
end
def surround_selection( parenthesis = nil )
if ! @current_buffer.selecting?
set_iline "Nothing selected."
return
end
parenthesis ||= get_user_input( "Parenthesis: " )
return if parenthesis.nil?