|
|
@ -305,6 +305,10 @@ end |
|
|
|
|
|
|
|
|
|
|
|
function DocView:draw_line_body(idx, x, y) |
|
|
|
function DocView:draw_line_body(idx, x, y) |
|
|
|
local line, col = self.doc:get_selection() |
|
|
|
local line, col = self.doc:get_selection() |
|
|
|
|
|
|
|
local sw = self:get_font():get_width(" ") |
|
|
|
|
|
|
|
local w = math.ceil(1 * SCALE) |
|
|
|
|
|
|
|
local lh = self:get_line_height() |
|
|
|
|
|
|
|
local color = style.guide or style.selection |
|
|
|
|
|
|
|
|
|
|
|
-- draw selection if it overlaps this line |
|
|
|
-- draw selection if it overlaps this line |
|
|
|
local line1, col1, line2, col2 = self.doc:get_selection(true) |
|
|
|
local line1, col1, line2, col2 = self.doc:get_selection(true) |
|
|
@ -324,6 +328,9 @@ function DocView:draw_line_body(idx, x, y) |
|
|
|
self:draw_line_highlight(x + self.scroll.x, y) |
|
|
|
self:draw_line_highlight(x + self.scroll.x, y) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- draw ruler |
|
|
|
|
|
|
|
renderer.draw_rect(x + config.line_limit * sw, y, sw, lh, color) |
|
|
|
|
|
|
|
|
|
|
|
-- draw line's text |
|
|
|
-- draw line's text |
|
|
|
self:draw_line_text(idx, x, y) |
|
|
|
self:draw_line_text(idx, x, y) |
|
|
|
|
|
|
|
|
|
|
|