diff options
author | jgmdev <jgmdev@gmail.com> | 2022-05-22 14:37:28 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-05-22 14:37:28 -0400 |
commit | 76bacb1fe9d0d92bb8c22a6767a98b0589d4bdd3 (patch) | |
tree | 11091b18f989d310fe43996b60e15ff482520c50 /plugins/centerdoc.lua | |
parent | 694132ec9d81ced3d8c6ebbf10e451bbc5a9e65b (diff) | |
download | lite-xl-plugins-76bacb1fe9d0d92bb8c22a6767a98b0589d4bdd3.tar.gz lite-xl-plugins-76bacb1fe9d0d92bb8c22a6767a98b0589d4bdd3.zip |
Fix various plugins for linewrapping
Diffstat (limited to 'plugins/centerdoc.lua')
-rw-r--r-- | plugins/centerdoc.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/centerdoc.lua b/plugins/centerdoc.lua index c657725..a771925 100644 --- a/plugins/centerdoc.lua +++ b/plugins/centerdoc.lua @@ -15,14 +15,16 @@ local draw_line_gutter = DocView.draw_line_gutter local get_gutter_width = DocView.get_gutter_width -function DocView:draw_line_gutter(idx, x, y, width) +function DocView:draw_line_gutter(line, x, y, width) + local lh if not config.plugins.centerdoc.enable then - draw_line_gutter(self, idx, x, y, width) + lh = draw_line_gutter(self, line, x, y, width) else local real_gutter_width = get_gutter_width(self) local offset = self:get_gutter_width() - real_gutter_width * 2 - draw_line_gutter(self, idx, x + offset, y, real_gutter_width) + lh = draw_line_gutter(self, line, x + offset, y, real_gutter_width) end + return lh end |