From caaab4c95ebb7d5243556d1f0c254302babdb657 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Wed, 19 Oct 2022 08:31:11 -0700 Subject: [PATCH] Fix for windows --- lua/hflip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/hflip.lua b/lua/hflip.lua index 7b45b3b..5e1f9f0 100644 --- a/lua/hflip.lua +++ b/lua/hflip.lua @@ -32,7 +32,7 @@ local function hflip() for i = 1, #exts - 1 do local j = (i + ext_index - 1) % #exts + 1 local next_path = name .. exts[j] - if file_exists(next_path) then + if path ~= next_path and file_exists(next_path) then vim.cmd(string.format('e %s', next_path)) break end