vis-config

lua scripts to configure vis editor

git clone https://9o.is/git/vis-config.git

commit 13a29c90d11a003b5c6147934a872c6c67a850d8
parent a631a50adc95e1c4c93586e0e73454ab08a2fb3a
Author: Jul <jul@9o.is>
Date:   Mon, 16 Feb 2026 10:44:14 +0800

fix session.lua conditional error

Diffstat:
Mlib/session.lua | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/session.lua b/lib/session.lua @@ -63,7 +63,7 @@ local function pos_setup(win) local poss = read(M.pos_path) for _,v in pairs(poss) do - pos, pospath = v:match('^(%d+) (.+)$') + local pos, pospath = v:match('^(%d+) (.+)$') if path == pospath then win.selection.pos = tonumber(pos) break @@ -80,8 +80,8 @@ local function pos_write(win) if not f then return end for i,v in ipairs(poss) do - pos, pospath = v:match('^(%d+) (.+)$') - if not path == pospath then + local pos, pospath = v:match('^(%d+) (.+)$') + if path ~= pospath then f:write(string.format('%s\n', v)) end end