make ruler not visible in command view

master
Alessandro Mauri 3 years ago
parent fe3f1211ad
commit b507e7c439
  1. 4
      TODO
  2. 3
      data/core/docview.lua
  3. 1
      data/core/view.lua

@ -10,7 +10,8 @@
[ ] font: use system fonts
[ ] font: implement hashmap of already rendered glyphs and only re-draw the
ones that are not in that map
[ ] resize text on the fly
[ ] font: resize text on the fly
[ ] ui: change ui scale on the fly
[x] add menu to exec arbitrary command -> added console
[ ] that command can be what is selected
[ ] console: accept input
@ -51,3 +52,4 @@
search feature
[x] implement visual "ruler" at column 80
[ ] show hidden files config and binding
[ ] syntax: highlight FIXME TODO BUG FIX and IMPROVEMENT keywords

@ -325,7 +325,8 @@ function DocView:draw_line_body(idx, x, y)
end
-- draw ruler
if config.line_limit > 0 then
-- FIXME: matching for name of the view may be expensive
if config.line_limit > 0 and (core.active_view:get_name() ~= "---") then
local sw = self:get_font():get_width(" ")
local w = math.ceil(1 * SCALE)
local lh = self:get_line_height()

@ -38,6 +38,7 @@ function View:try_close(do_close)
end
-- FIXME: what if a file is called "---"? this should be changed
function View:get_name()
return "---"
end

Loading…
Cancel
Save