diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-09 20:15:05 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-03-09 20:15:05 +0100 |
commit | dc98ffdc842271d05903846b460fab90d4d83739 (patch) | |
tree | 49603cd805408ebdde3a7eafc59c40279dc7e9ad /tex/context/base/buff-ver.lua | |
parent | 08128a9710f7a34e16f7487b3bccfe7feadb36f1 (diff) | |
download | context-dc98ffdc842271d05903846b460fab90d4d83739.tar.gz |
2015-03-09 19:29:00
Diffstat (limited to 'tex/context/base/buff-ver.lua')
-rw-r--r-- | tex/context/base/buff-ver.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua index 832c14122..7e7120eae 100644 --- a/tex/context/base/buff-ver.lua +++ b/tex/context/base/buff-ver.lua @@ -624,14 +624,16 @@ end local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere local noflines = #lines - local first, last = first or 1, last or noflines + local first = first or 1 + local last = last or noflines if last < 0 then last = noflines + last end - local range = settings.range local what = settings_to_array(range) - local r_first, r_last = what[1], what[2] - local f, l = tonumber(r_first), tonumber(r_last) + local r_first = what[1] + local r_last = what[2] + local f = tonumber(r_first) + local l = tonumber(r_last) if r_first then if f then if f > first then @@ -688,6 +690,7 @@ local function filter(lines,settings) -- todo: inline or display in settings end local line, n = 0, 0 local first, last, m = getstrip(lines) + local range = settings.range if range then first, last = getrange(lines,first,last,range) first, last = getstrip(lines,first,last) |