aboutsummaryrefslogtreecommitdiff
path: root/vis.lua
diff options
context:
space:
mode:
Diffstat (limited to 'vis.lua')
-rw-r--r--vis.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/vis.lua b/vis.lua
index 59d0590..297c09e 100644
--- a/vis.lua
+++ b/vis.lua
@@ -250,7 +250,7 @@ vis.events.win_syntax = function(win, name)
return true
end
-vis.events.win_highlight = function(win)
+vis.events.win_highlight = function(win, horizon_max)
if win.syntax == nil or vis.lexers == nil then
return
end
@@ -261,7 +261,6 @@ vis.events.win_highlight = function(win)
-- TODO: improve heuristic for initial style
local viewport = win.viewport
- local horizon_max = 32768
local horizon = viewport.start < horizon_max and viewport.start or horizon_max
local view_start = viewport.start
local lex_start = viewport.start - horizon