diff options
author | jgmdev <jgmdev@gmail.com> | 2022-06-03 03:11:06 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-06-03 03:11:06 -0400 |
commit | cde1c42b680fca2238ad0e766e5fee29b65a1fe3 (patch) | |
tree | 7f81a3032cd7fa9cc1f207a1cb04dab4e133e166 /plugins/bracketmatch.lua | |
parent | 675a319d1ecfa43ceac8f7e4b8eb956e38e39105 (diff) | |
download | lite-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.lua | 13 |
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 |