diff options
author | Marius <mariausol@gmail.com> | 2010-09-22 11:03:47 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-09-22 11:03:47 +0300 |
commit | 9d17a4bc572f48289b6d188684a7bbf8c46839fe (patch) | |
tree | b80a082a5d00cd7ee84a8c51c6a5b13d574f2447 /tex/context/base/buff-ini.lua | |
parent | f986a332f76934300807a66702e402cc57c4b776 (diff) | |
download | context-9d17a4bc572f48289b6d188684a7bbf8c46839fe.tar.gz |
beta 2010.09.22 09:35
Diffstat (limited to 'tex/context/base/buff-ini.lua')
-rw-r--r-- | tex/context/base/buff-ini.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tex/context/base/buff-ini.lua b/tex/context/base/buff-ini.lua index 4ae4df699..a590cf81a 100644 --- a/tex/context/base/buff-ini.lua +++ b/tex/context/base/buff-ini.lua @@ -153,6 +153,9 @@ end function buffers.range(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere local first, last = first or 1, last or #lines + if last < 0 then + last = #lines + last + end local what = settings_to_array(range) local r_first, r_last = what[1], what[2] local f, l = tonumber(r_first), tonumber(r_last) @@ -172,6 +175,9 @@ function buffers.range(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere end if r_last then if l then + if l < 0 then + l = #lines + l + end if find(r_last,"^[%+]") then -- 1,+3 l = first + l end |