aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/editing.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-05-28 01:16:17 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-05-28 01:16:17 -0400
commit051cbbb22737b7e1937bd12a5f222779de6cd982 (patch)
treee066b853238ada15eb525d6d313fbbae117dd6be /modules/textadept/editing.lua
parent7cb94f5f7d67214bd2514365871fe5438ba89d07 (diff)
downloadtextadept-051cbbb22737b7e1937bd12a5f222779de6cd982.tar.gz
textadept-051cbbb22737b7e1937bd12a5f222779de6cd982.zip
Removed `textadept.editing.select_indented_block()`.
Diffstat (limited to 'modules/textadept/editing.lua')
-rw-r--r--modules/textadept/editing.lua23
1 files changed, 0 insertions, 23 deletions
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
@@ -406,29 +406,6 @@ function M.select_paragraph()
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
-- converted to tabs. Otherwise, all indenting tabs are converted to