diff --git a/lib/diakonos/functions/text-manipulation.rb b/lib/diakonos/functions/text-manipulation.rb index 145ca7d..97c685d 100644 --- a/lib/diakonos/functions/text-manipulation.rb +++ b/lib/diakonos/functions/text-manipulation.rb @@ -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?