From f58634d649d5774d438f745fbd96caca16aef2c2 Mon Sep 17 00:00:00 2001 From: zztrieuzz Date: Mon, 31 Jul 2023 08:28:04 +0700 Subject: [PATCH] remove command floatline fix #62 --- lua/windline/components/basic.lua | 8 ++++---- lua/windline/init.lua | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/windline/components/basic.lua b/lua/windline/components/basic.lua index 7a74b30..f170306 100644 --- a/lua/windline/components/basic.lua +++ b/lua/windline/components/basic.lua @@ -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 diff --git a/lua/windline/init.lua b/lua/windline/init.lua index 62b413a..5ed65f1 100644 --- a/lua/windline/init.lua +++ b/lua/windline/init.lua @@ -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 @@ -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