Add full filename path in window's title

Optimal implementation to limite computations in core.step.
This commit is contained in:
Francesco Abbate
2021-02-18 00:26:19 +01:00
parent 59fbf9cfc0
commit de1afb3391
3 changed files with 32 additions and 8 deletions
+6
View File
@@ -90,6 +90,12 @@ function DocView:get_name()
end
function DocView:get_filename()
local post = self.doc:is_dirty() and "*" or ""
return (self.doc.abs_filename and self.doc.abs_filename or "unsaved") .. post
end
function DocView:get_scrollable_size()
return self:get_line_height() * (#self.doc.lines - 1) + self.size.y
end