From cde1c42b680fca2238ad0e766e5fee29b65a1fe3 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Fri, 3 Jun 2022 03:11:06 -0400 Subject: bracketmatch: return line height on DocView:draw_line_text --- plugins/bracketmatch.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins/bracketmatch.lua') 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 -- cgit v1.2.3