aboutsummaryrefslogtreecommitdiff
path: root/plugins/bracketmatch.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-06-03 03:11:06 -0400
committerjgmdev <jgmdev@gmail.com>2022-06-03 03:11:06 -0400
commitcde1c42b680fca2238ad0e766e5fee29b65a1fe3 (patch)
tree7f81a3032cd7fa9cc1f207a1cb04dab4e133e166 /plugins/bracketmatch.lua
parent675a319d1ecfa43ceac8f7e4b8eb956e38e39105 (diff)
downloadlite-xl-plugins-cde1c42b680fca2238ad0e766e5fee29b65a1fe3.tar.gz
lite-xl-plugins-cde1c42b680fca2238ad0e766e5fee29b65a1fe3.zip
bracketmatch: return line height on DocView:draw_line_text
Diffstat (limited to 'plugins/bracketmatch.lua')
-rw-r--r--plugins/bracketmatch.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/bracketmatch.lua b/plugins/bracketmatch.lua
index 6963224..6119330 100644
--- a/plugins/bracketmatch.lua
+++ b/plugins/bracketmatch.lua
@@ -230,16 +230,17 @@ end
local draw_line_text = DocView.draw_line_text
-function DocView:draw_line_text(idx, x, y)
- draw_line_text(self, idx, x, y)
+function DocView:draw_line_text(line, x, y)
+ local lh = draw_line_text(self, line, x, y)
if self.doc == state.doc and state.line2 then
- if idx == state.line2 then
- draw_decoration(self, x, y, idx, state.col2)
+ if line == state.line2 then
+ draw_decoration(self, x, y, line, state.col2)
end
- if idx == state.line and config.plugins.bracketmatch.highlight_both then
- draw_decoration(self, x, y, idx, state.col + select_adj - 1)
+ if line == state.line and config.plugins.bracketmatch.highlight_both then
+ draw_decoration(self, x, y, line, state.col + select_adj - 1)
end
end
+ return lh
end