diff options
author | jgmdev <jgmdev@gmail.com> | 2022-12-08 15:10:23 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-12-08 15:10:23 -0400 |
commit | 83c90a7cba27804eb7f5867aa53a410c085fc20d (patch) | |
tree | 0f3fd28917adf93845fa2494d96eca0801a938ab | |
parent | 1ffa8dbc37f14f8d50ea1a53eee99ca1b6ac1417 (diff) | |
download | lite-xl-plugins-83c90a7cba27804eb7f5867aa53a410c085fc20d.tar.gz lite-xl-plugins-83c90a7cba27804eb7f5867aa53a410c085fc20d.zip |
centerdoc: better spacing on center mode
-rw-r--r-- | plugins/centerdoc.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/centerdoc.lua b/plugins/centerdoc.lua index 980cbed..824ef2a 100644 --- a/plugins/centerdoc.lua +++ b/plugins/centerdoc.lua @@ -3,6 +3,7 @@ local core = require "core" local config = require "core.config" local common = require "core.common" local command = require "core.command" +local style = require "core.style" local keymap = require "core.keymap" local treeview = require "plugins.treeview" local DocView = require "core.docview" @@ -22,7 +23,7 @@ function DocView:draw_line_gutter(line, x, y, width) lh = draw_line_gutter(self, line, x, y, width) else local real_gutter_width = self:get_font():get_width(#self.doc.lines) - local offset = self:get_gutter_width() - real_gutter_width * 2 + local offset = self:get_gutter_width() - real_gutter_width * 2 - style.padding.x lh = draw_line_gutter(self, line, x + offset, y, real_gutter_width) end return lh |