fix line number align bug
This commit is contained in:
parent
63f406773b
commit
4ad353eb4b
|
@ -391,7 +391,7 @@ function DocView:draw_line_gutter(idx, x, y)
|
||||||
end
|
end
|
||||||
local yoffset = self:get_line_text_y_offset()
|
local yoffset = self:get_line_text_y_offset()
|
||||||
x = x + style.padding.x
|
x = x + style.padding.x
|
||||||
local width = string.len(tostring(#self.doc.lines)) * style.padding.x / 2 + style.padding.x / 2
|
local width = local width = self:get_font():get_width(#self.doc.lines)
|
||||||
common.draw_text(self:get_font(), color, idx, "right", x, y + yoffset, width, self:get_line_height())
|
common.draw_text(self:get_font(), color, idx, "right", x, y + yoffset, width, self:get_line_height())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue