Added header comments to selection functions.

This commit is contained in:
Pistos 2011-07-21 13:16:17 -04:00
parent abff722172
commit d766bb9970
2 changed files with 12 additions and 2 deletions

View file

@ -13,15 +13,18 @@ module Diakonos
buffer_current.clear_matches Buffer::DO_DISPLAY
end
# Unselects any current selection (stops selecting).
def remove_selection
buffer_current.remove_selection
update_status_line
end
# Selects the entire buffer contents.
def select_all
buffer_current.select_all
end
# Selects text between two regexps.
def select_block( beginning = nil, ending = nil, including_ending = true )
if beginning.nil?
input = get_user_input( "Start at regexp: " )
@ -40,30 +43,37 @@ module Diakonos
end
end
# Changes selection mode to block mode (rectangular selection).
def selection_mode_block
buffer_current.selection_mode_block
update_status_line
end
# Changes selection mode to normal mode (flow selection).
def selection_mode_normal
buffer_current.selection_mode_normal
update_status_line
end
# If currently selecting, stops selecting.
# If not currently selecting, begins selecting.
def toggle_selection
buffer_current.toggle_selection
update_status_line
end
# Selects the current line.
def select_line
buffer_current.select_current_line
update_status_line
end
# Selects the code block which wraps the current cursor position.
# Execute multiple times in succession to select increasingly outer code blocks.
def select_wrapping_block
buffer_current.select_wrapping_block
update_status_line
end
end
end
end

View file

@ -1,6 +1,6 @@
module Diakonos
VERSION = '0.8.15'
LAST_MODIFIED = 'July 20, 2011'
LAST_MODIFIED = 'July 21, 2011'
def self.parse_version( s )
if s