X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=pygdb.vim;h=9486db462b189d6a0ee6a326f6b82dd4c412ddf5;hb=5d8a5dbbe84a2c74de62e5c83eabd06081512e48;hp=7a8b89f45901be31ed691ac53b268cb84ef0022d;hpb=127bb50e7d884d3a413ab4b3b429e89b5dfebf74;p=pygdb.git diff --git a/pygdb.vim b/pygdb.vim index 7a8b89f..9486db4 100644 --- a/pygdb.vim +++ b/pygdb.vim @@ -1,4 +1,11 @@ -"shuber, 2008-06-08 +"pygdb.vim - pygtk interface to gdb in connection with (g)vim +" Maintainer: Stefan Huber + + +if !has('python') + echo "Error: Required vim compiled with +python" + finish +endif if ! exists("g:pygdb") @@ -28,9 +35,17 @@ clientcmd = "" execsign = None def gdbLaunch(): - global gdbBps, clientcmd + global gdbBps, clientcmd, pygdbdir + + clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd) + + #Pressed esq? + if clientcmd == None: + clientcmd = "" + return - clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd).strip() + #Strip away white space + clientcmd = clientcmd.strip() if clientcmd.strip()=="": print "No command given!" @@ -198,7 +213,12 @@ def toAbsPath(path): #We need the client command to expand the paths... while clientcmd == "" or not cmdset: - clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd).strip() + clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd) + + if clientcmd == None: + clientcmd = "" + clientcmd = clientcmd.strip() + cmdset = True #Get the dirs where executeable is in