do not try to surround a selection if nothing is selected
This commit is contained in:
parent
291fd530d5
commit
32de892fa1
1 changed files with 5 additions and 0 deletions
|
@ -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?
|
||||
|
||||
|
|
Loading…
Reference in a new issue