From 9eb057eeacd1c6ba01c19797a0150203768bf2e8 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 7 Sep 2024 04:05:29 +0200 Subject: [PATCH] fix: typo, check direction --- lua/codemp/neo-tree/commands.lua | 3 ++- lua/codemp/neo-tree/components.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/codemp/neo-tree/commands.lua b/lua/codemp/neo-tree/commands.lua index f3f9419..d742658 100644 --- a/lua/codemp/neo-tree/commands.lua +++ b/lua/codemp/neo-tree/commands.lua @@ -13,8 +13,9 @@ M.refresh = require("neo-tree.utils").wrap(manager.refresh, "codemp") M.open = function(state, path, extra) local selected = state.tree:get_node() if selected.type == "spacer" then return end + if selected.type == "title" then return end if selected.type == "root" then - if selected.name == "[connect]" and session.client ~= nil then + if selected.name == "[connect]" and session.client == nil then client_manager.connect() end return diff --git a/lua/codemp/neo-tree/components.lua b/lua/codemp/neo-tree/components.lua index c5b5bd7..1755d13 100644 --- a/lua/codemp/neo-tree/components.lua +++ b/lua/codemp/neo-tree/components.lua @@ -49,7 +49,7 @@ end M.name = function(config, node, state) local highlight = config.highlight or highlights.FILE_NAME local text = node.name - if node.type == "tutle" then + if node.type == "title" then text = ":: " .. node.name .. " ::" highlight = highlights.PREVIEW elseif node.type == "root" then