Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Always explicitly use remote or local file path class

Stop using FilePath and work out the correct class depending on context.
  • Loading branch information...
commit e6d8dadb6bcf00ebc65adafac18e104f45d6ae03 1 parent e9fef5f
Jonathan Cairns authored
2  plugin/python/vdebug/event.py
View
@@ -141,7 +141,7 @@ def execute(self,runner):
filename_pos = line.find(" @ ") + 3
file_and_line = line[filename_pos:]
line_pos = file_and_line.rfind(":")
- file = vdebug.util.FilePath(file_and_line[:line_pos])
+ file = vdebug.util.LocalFilePath(file_and_line[:line_pos])
lineno = file_and_line[line_pos+1:]
runner.ui.sourcewin.set_file(file)
runner.ui.sourcewin.set_line(lineno)
2  plugin/python/vdebug/runner.py
View
@@ -113,7 +113,7 @@ def refresh(self,status):
stack_res = self.update_stack()
stack = stack_res.get_stack()
- self.cur_file = vdebug.util.FilePath(stack[0].get('filename'))
+ self.cur_file = vdebug.util.RemoteFilePath(stack[0].get('filename'))
self.cur_lineno = stack[0].get('lineno')
vdebug.log.Log("Moving to current position in source window")
6 plugin/python/vdebug/ui/vimui.py
View
@@ -94,7 +94,7 @@ def set_listener_details(self,addr,port,idekey):
self.statuswin.insert(details,1,True)
def get_current_file(self):
- return vdebug.util.FilePath(vim.current.buffer.name)
+ return vdebug.util.LocalFilePath(vim.current.buffer.name)
def get_current_row(self):
return vim.current.window.cursor[0]
@@ -229,7 +229,7 @@ def set_line(self,lineno):
def get_file(self):
self.focus()
- self.file = vdebug.util.FilePath(vim.eval("expand('%:p')"))
+ self.file = vdebug.util.LocalFilePath(vim.eval("expand('%:p')"))
return self.file
def clear_signs(self):
@@ -470,7 +470,7 @@ def render(self):
string = ""
for s in stack:
where = s.get('where') if s.get('where') else 'main'
- file = vdebug.util.FilePath(s.get('filename'))
+ file = vdebug.util.LocalFilePath(s.get('filename'))
line = "[%(num)s] %(where)s @ %(file)s:%(line)s" \
%{'num':s.get('level'),'where':where,\
'file':str(file),'line':s.get('lineno')}
Please sign in to comment.
Something went wrong with that request. Please try again.