e: determine server name with two directory components instead of one
This commit is contained in:
parent
cf0b120ae7
commit
84c7b6a20b
6
e
6
e
@ -9,7 +9,11 @@ def get_server_name(path)
|
|||||||
while path != "/"
|
while path != "/"
|
||||||
dirname = File.dirname(path)
|
dirname = File.dirname(path)
|
||||||
if File.exists?(File.join(dirname, "project.vim"))
|
if File.exists?(File.join(dirname, "project.vim"))
|
||||||
sn = File.basename(dirname) + "1"
|
if dirname =~ %r{([^/]+)/([^/]+)/*$}
|
||||||
|
sn = "#{$2}(#{$1})"
|
||||||
|
else
|
||||||
|
sn = File.basename(dirname)
|
||||||
|
end
|
||||||
return sn
|
return sn
|
||||||
end
|
end
|
||||||
path = dirname
|
path = dirname
|
||||||
|
Loading…
x
Reference in New Issue
Block a user