From 20a87ac78c768f26c92b437f20f99ffc77a0dd63 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Mon, 27 Sep 2021 14:44:44 +0600 Subject: [PATCH] fix: typo + make notice buffer not modifiable closes #68 --- lua/lualine/config.lua | 6 +++--- lua/lualine/utils/notices.lua | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lualine/config.lua b/lua/lualine/config.lua index 30a7e65..fd791db 100644 --- a/lua/lualine/config.lua +++ b/lua/lualine/config.lua @@ -28,11 +28,11 @@ local config = { extensions = {}, } -local function check_sep_format_deprication(sep) +local function check_sep_format_deprecation(sep) if type(sep) == 'table' and vim.tbl_islist(sep) then require('lualine.utils.notices').add_persistent_notice(string.format [[ ### option.separator -Using list for configuring separators has been depricated. Please configure it +Using list for configuring separators has been deprecated. Please configure it with {left = left_sep, right = right_sep} like table. ]]) sep = { left = sep[1], right = sep[2] or sep[1] } @@ -46,7 +46,7 @@ local function fix_separators(separators) if type(separators) == 'string' then return { left = separators, right = separators } else - return check_sep_format_deprication(separators) + return check_sep_format_deprecation(separators) end end return separators diff --git a/lua/lualine/utils/notices.lua b/lua/lualine/utils/notices.lua index 4bc54ef..4b8701e 100644 --- a/lua/lualine/utils/notices.lua +++ b/lua/lualine/utils/notices.lua @@ -52,6 +52,7 @@ function M.show_notices() notice = vim.list_extend(notice, vim.tbl_flatten(notices)) vim.fn.append(0, notice) vim.api.nvim_win_set_cursor(0, { 1, 0 }) + vim.bo.modifiable=false end function M.clear_notices()