fixup: escape results of vim_var components
This commit is contained in:
parent
c6d7485114
commit
788805771c
|
@ -1,6 +1,8 @@
|
||||||
-- Copyright (c) 2020-2021 shadmansaleh
|
-- Copyright (c) 2020-2021 shadmansaleh
|
||||||
-- MIT license, see LICENSE for more details.
|
-- MIT license, see LICENSE for more details.
|
||||||
|
local require = require('lualine_require').require
|
||||||
local M = require('lualine.component'):extend()
|
local M = require('lualine.component'):extend()
|
||||||
|
local utils = require('lualine.utils.utils')
|
||||||
|
|
||||||
function M:update_status()
|
function M:update_status()
|
||||||
local component = self.options[1]
|
local component = self.options[1]
|
||||||
|
@ -29,7 +31,7 @@ function M:update_status()
|
||||||
end
|
end
|
||||||
local ok
|
local ok
|
||||||
ok, return_val = pcall(tostring, return_val)
|
ok, return_val = pcall(tostring, return_val)
|
||||||
return ok and return_val or ''
|
return ok and utils.stl_escape(return_val) or ''
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
Loading…
Reference in New Issue