From ddc84cf0fd25ff770d8d4a93d57c74ff57744fea Mon Sep 17 00:00:00 2001 From: Ali Almohaya Date: Tue, 27 Sep 2022 00:21:42 +0300 Subject: [PATCH] fix: do not open exec open file if there is no active buffer --- lua/openingh/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/openingh/init.lua b/lua/openingh/init.lua index f39b007..b37af1a 100644 --- a/lua/openingh/init.lua +++ b/lua/openingh/init.lua @@ -27,7 +27,8 @@ function M.openFile() local file_path = utils.get_current_relative_file_path() - if file_path:len() == 0 then + -- if there is no buffer opened + if file_path == "/" then print("There is no active file to open!") return end