X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=pygdb.vim;h=b02495ad079d52f81d0ee4a7306047c6d61f1c3a;hb=71d49bb703b17f3000aac3d13767d7779fae9895;hp=7a8b89f45901be31ed691ac53b268cb84ef0022d;hpb=127bb50e7d884d3a413ab4b3b429e89b5dfebf74;p=pygdb.git diff --git a/pygdb.vim b/pygdb.vim index 7a8b89f..b02495a 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") @@ -30,7 +37,15 @@ execsign = None def gdbLaunch(): global gdbBps, clientcmd - clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd).strip() + clientcmd = vim.eval("input('Client commando: ', '%s')" % clientcmd) + + #Pressed esq? + if clientcmd == None: + clientcmd = "" + return + + #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