File tree 2 files changed +3
-6
lines changed 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ Return active connection for the given path
28
28
* pwd* ** (string)** : path (usually project root).
29
29
30
30
31
- ** ({ string,string} )** Connection tuple with ip and port or nil.
31
+ ** (string)** Id of the current connection for the path or nil.
32
32
33
33
34
34
## ` acid.connections.get(pwd) `
Original file line number Diff line number Diff line change 59
59
connections .unselect = function (pwd )
60
60
pwd = pwd_to_key (pwd )
61
61
62
- -- TODO Potentially wrong
63
62
connections .current [pwd ] = nil
64
63
end
65
64
66
65
--- Return active connection for the given path
67
66
-- @tparam [opt] string pwd path (usually project root).
68
- -- @treturn { string,string} Connection tuple with ip and port or nil.
67
+ -- @treturn string Id of the current connection for the path or nil.
69
68
connections .peek = function (pwd )
70
69
pwd = pwd_to_key (pwd or vim .api .nvim_call_function (" getcwd" , {}))
71
70
return connections .current [pwd ]
75
74
-- @tparam string pwd path (usually project root).
76
75
-- @treturn {string,string} Connection tuple with ip and port or nil.
77
76
connections .get = function (pwd )
78
- pwd = pwd_to_key (pwd )
79
-
80
- local ix = connections .current [pwd ]
77
+ local ix = connections .peek (pwd )
81
78
82
79
if ix == nil then
83
80
return nil
You can’t perform that action at this time.
0 commit comments