Soft Line Wrapping (#636)

Added in soft line wrapping.
This commit is contained in:
Adam
2022-04-03 16:44:02 -04:00
committed by Adam Harrison
parent 048d250f5e
commit 3479890ce5
4 changed files with 581 additions and 52 deletions
+3 -2
View File
@@ -56,8 +56,8 @@ function CommandView:get_name()
end
function CommandView:get_line_screen_position()
local x = CommandView.super.get_line_screen_position(self, 1)
function CommandView:get_line_screen_position(line, col)
local x = CommandView.super.get_line_screen_position(self, 1, col)
local _, y = self:get_content_offset()
local lh = self:get_line_height()
return x, y + (self.size.y - lh) / 2
@@ -243,6 +243,7 @@ function CommandView:draw_line_gutter(idx, x, y)
x = x + style.padding.x
renderer.draw_text(self:get_font(), self.label, x, y + yoffset, color)
core.pop_clip_rect()
return self:get_line_height()
end