@@ -23,6 +23,7 @@ def look_ropeproject(path):
2323 :return str|None: A finded path
2424
2525 """
26+ env .debug ('Look project' ,path )
2627p = os .path .abspath (path )
2728
2829while True :
@@ -31,7 +32,7 @@ def look_ropeproject(path):
3132
3233new_p = os .path .abspath (os .path .join (p ,".." ))
3334if new_p == p :
34- return '.'
35+ return path
3536
3637p = new_p
3738
@@ -279,7 +280,8 @@ def get_ctx(*args, **kwargs):
279280if resources .get (path ):
280281return resources .get (path )
281282
282- project_path = os .path .dirname (env .curdir )
283+ project_path = env .curdir
284+ env .debug ('Look ctx' ,project_path )
283285if env .var ('g:pymode_rope_lookup_project' ,True ):
284286project_path = look_ropeproject (project_path )
285287
@@ -353,8 +355,10 @@ def __init__(self, path, project_path):
353355self .generate_autoimport_cache ()
354356
355357env .debug ('Context init' ,project_path )
358+ env .message ('Init Rope project: %s' % project_path )
356359
357360def __enter__ (self ):
361+ env .let ('g:pymode_rope_current' ,self .project .root .real_path )
358362self .project .validate (self .project .root )
359363self .resource = libutils .path_to_resource (
360364self .project ,env .curbuf .name ,'file' )