From c827b85fc2293254e20b0e9573f3b95f1472f8af Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Mon, 23 Jun 2008 15:37:43 +0200 Subject: [PATCH] cope with pressing esq when entering client cmd --- StatusFrame.py | 2 +- pygdb.vim | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) 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 -- 2.30.2