From 788805771c1ca7fe2c6652c38523cf208908934c Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Thu, 28 Jul 2022 13:30:14 +0600 Subject: [PATCH] fixup: escape results of vim_var components --- lua/lualine/components/special/vim_var_component.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lualine/components/special/vim_var_component.lua b/lua/lualine/components/special/vim_var_component.lua index 6cf89f3..e3924d4 100644 --- a/lua/lualine/components/special/vim_var_component.lua +++ b/lua/lualine/components/special/vim_var_component.lua @@ -1,6 +1,8 @@ -- Copyright (c) 2020-2021 shadmansaleh -- MIT license, see LICENSE for more details. +local require = require('lualine_require').require local M = require('lualine.component'):extend() +local utils = require('lualine.utils.utils') function M:update_status() local component = self.options[1] @@ -29,7 +31,7 @@ function M:update_status() end local ok ok, return_val = pcall(tostring, return_val) - return ok and return_val or '' + return ok and utils.stl_escape(return_val) or '' end return M