Skip to content

Commit

Permalink
remove command floatline fix #62
Browse files Browse the repository at this point in the history
  • Loading branch information
zztrieuzz committed Jul 31, 2023
1 parent 7bc8baf commit f58634d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lua/windline/components/basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ M.line_col = [[ %3l:%-2c ]]
M.progress = [[%3p%%]]
M.full_file_name = '%f'

M.progress_lua = function(_,_,_, is_floatline)
if is_floatline == nil then return M.progress end
M.progress_lua = function(_,_,_, is_global)
if is_global == nil then return M.progress end
local line_fraction = math.floor(vim.fn.line('.') / vim.fn.line('$') * 100)
.. '%%'
return string.format("%5s",line_fraction)
end

M.line_col_lua = function(_, _,_,is_floatline)
if is_floatline == nil then return M.line_col end
M.line_col_lua = function(_, _,_,is_global)
if is_global == nil then return M.line_col end
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
return string.format(' %3s:%-2s ', row, col + 1)
end
Expand Down
2 changes: 0 additions & 2 deletions lua/windline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ M.setup = function(opts)
require('wltabline').setup(opts.tabline)
end
require('windline.cache_utils').reset()
if M.state.floatline then WindLine.floatline_disable() end
if M.anim_reset then M.anim_reset() end

M.state.config.colors_name = opts.colors_name
Expand Down Expand Up @@ -330,7 +329,6 @@ M.setup_event = function()
callback = function() M.on_set_laststatus() end
})
api.nvim_create_user_command("WindLineBenchmark", "lua require('windline.benchmark').benchmark()", {})
api.nvim_create_user_command("WindLineFloatToggle", "lua require('wlfloatline').toggle()", {})

end

Expand Down

0 comments on commit f58634d

Please sign in to comment.