From: Stefan Huber Date: Mon, 23 Jun 2008 13:37:43 +0000 (+0200) Subject: cope with pressing esq when entering client cmd X-Git-Tag: v0.99.2^0 X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=c827b85fc2293254e20b0e9573f3b95f1472f8af;p=pygdb.git cope with pressing esq when entering client cmd --- diff --git a/StatusFrame.py b/StatusFrame.py index 37f7bbf..7fc8083 100644 --- a/StatusFrame.py +++ b/StatusFrame.py @@ -19,7 +19,7 @@ class StatusFrame (gtk.Frame): def fillConfiguration(self, conf): raise NotImplemented() - def updateValues(self, pos): + def updateValues(self, status, param): raise NotImplemented() diff --git a/pygdb.vim b/pygdb.vim index 642b327..b02495a 100644 --- a/pygdb.vim +++ b/pygdb.vim @@ -37,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!" @@ -205,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