aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/editing.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2015-03-11 16:53:07 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2015-03-11 16:53:07 -0400
commit85450b9983ec16b27981572c258298e6fbf2f59d (patch)
tree3a9557314cad78bde44d9d2030110339b73669f4 /modules/textadept/editing.lua
parent920c230f140c38ec072da27e522053aed2a9af75 (diff)
downloadtextadept-85450b9983ec16b27981572c258298e6fbf2f59d.tar.gz
textadept-85450b9983ec16b27981572c258298e6fbf2f59d.zip
Updated to Lua 5.3, LPeg 0.12.2, and lfs 1.6.3.
LuaJIT uses Lua 5.3's new utf8 library. Restored documentation for Lua 5.1 symbols and added deprecation notes.
Diffstat (limited to 'modules/textadept/editing.lua')
-rw-r--r--modules/textadept/editing.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index 93e34aec..ced101b2 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -450,7 +450,8 @@ function M.convert_indentation()
local indent, e = line_indentation[line], line_indent_position[line]
current_indentation = buffer:text_range(s, e)
if buffer.use_tabs then
- new_indentation = ('\t'):rep(indent / buffer.tab_width)
+ -- Need integer division and LuaJIT does not have // operator.
+ new_indentation = ('\t'):rep(math.floor(indent / buffer.tab_width))
else
new_indentation = (' '):rep(indent)
end