From 051cbbb22737b7e1937bd12a5f222779de6cd982 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 28 May 2014 01:16:17 -0400 Subject: Removed `textadept.editing.select_indented_block()`. --- modules/textadept/editing.lua | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'modules/textadept/editing.lua') diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index c67542ba..d5d78ac6 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -405,29 +405,6 @@ function M.select_paragraph() buffer:para_down_extend() end ---- --- Selects the surrounding block of text whose lines' indentation levels are --- greater than or equal to the current line's level. --- If a text block is selected and the lines immediately above and below it are --- one indentation level lower, adds those lines to the selection. --- @name select_indented_block -function M.select_indented_block() - local buffer = buffer - local s = buffer:line_from_position(buffer.selection_start) - local e = buffer:line_from_position(buffer.selection_end) - local indent = buffer.line_indentation[s] - buffer.tab_width - if indent < 0 then return end - if buffer:get_sel_text() ~= '' and - buffer.line_indentation[s - 1] == indent and - buffer.line_indentation[e + 1] == indent then - s, e, indent = s - 1, e + 1, indent + buffer.tab_width - end - while buffer.line_indentation[s - 1] > indent do s = s - 1 end - while buffer.line_indentation[e + 1] > indent do e = e + 1 end - s, e = buffer:position_from_line(s), buffer.line_end_position[e] - buffer:set_sel(s, e) -end - --- -- Converts indentation between tabs and spaces according to `buffer.use_tabs`. -- If `buffer.use_tabs` is `true`, `buffer.tab_width` indenting spaces are -- cgit v1.2.3