def addBreakpoint(file, lineno, cond=None):
global gdbBps
+ #If file is not open, open it
+ if not file in [b.name for b in vim.buffers]:
+ try:
+ os.stat(file)
+ vim.command(":e %s" % file)
+ except OSError:
+ print "Warning: file '%s' does not exist! (Wrong client command?)" % file
+ return
+
+
#Determine a sign number
signnum = gdbNewSignnum()
removeBreakpoint(0)
#Add breakpoints from configuration
+ cmdset = False
for bp in conf.breakpoints:
file = bp["file"]
if file[0] != os.sep:
#We need the client command to expand the paths...
- while clientcmd == "":
+ while clientcmd == "" or not cmdset:
clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd).strip()
+ cmdset = True
#Get the dirs where executeable is in
relcmd = string.split(clientcmd)[0]