Merge pull request #696 from adamharrison/fix-lineguide

Added an exclusion for lineguide in the commandview.
This commit is contained in:
Adam 2021-11-24 13:28:04 -05:00 committed by GitHub
commit fe6ba4adb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 9 deletions

View File

@ -2,10 +2,12 @@
local config = require "core.config" local config = require "core.config"
local style = require "core.style" local style = require "core.style"
local DocView = require "core.docview" local DocView = require "core.docview"
local CommandView = require "core.commandview"
local draw_overlay = DocView.draw_overlay local draw_overlay = DocView.draw_overlay
function DocView:draw_overlay(...) function DocView:draw_overlay(...)
if not self:is(CommandView) then
local offset = self:get_font():get_width("n") * config.line_limit local offset = self:get_font():get_width("n") * config.line_limit
local x = self:get_line_screen_position(1) + offset local x = self:get_line_screen_position(1) + offset
local y = self.position.y local y = self.position.y
@ -14,6 +16,6 @@ function DocView:draw_overlay(...)
local color = style.guide or style.selection local color = style.guide or style.selection
renderer.draw_rect(x, y, w, h, color) renderer.draw_rect(x, y, w, h, color)
end
draw_overlay(self, ...) draw_overlay(self, ...)
end end