aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-10-06 23:42:31 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2012-10-06 23:42:31 -0400
commit3324d1eb5ae28647414b553e73a9537cd0806006 (patch)
tree1b23ca8e71015de4e59574f846350f7969a0a85a
parent65452e57c4fe6cb69184f0b783d9554ae72ea6b7 (diff)
Fixed more bugs introduced by r1260.
-rw-r--r--modules/lua/init.lua2
-rw-r--r--modules/textadept/editing.lua4
-rw-r--r--modules/textadept/keys.lua2
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/lua/init.lua b/modules/lua/init.lua
index 7d00a030..3e5038ca 100644
--- a/modules/lua/init.lua
+++ b/modules/lua/init.lua
@@ -122,7 +122,7 @@ function M.try_to_autocomplete_end()
buffer:new_line()
buffer:new_line()
buffer:add_text(patt:find('repeat') and 'until' or 'end')
- line_indentation[line_num + 1] = indent + buffer.indent
+ line_indentation[line_num + 1] = indent + buffer.tab_width
buffer:line_up()
buffer:line_end()
buffer:end_undo_action()
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index 23ac3980..8adff1a1 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -425,12 +425,12 @@ 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.indent
+ 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.indent
+ 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
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index aa6c2c03..c23ac073 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -235,7 +235,7 @@ M.utils = {
buffer:call_tip_show(buffer.current_pos, text)
end,
set_indentation = function(i)
- buffer.indent, buffer.tab_width = i, i
+ buffer.tab_width = i
events.emit(events.UPDATE_UI) -- for updating statusbar
end,
toggle_property = function(property, i)