summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-27 16:58:21 +0000
committerGuido van Rossum <guido@python.org>1992-01-27 16:58:21 +0000
commit3d02b09deec09f0aedf0ea23eeed87e327b696c5 (patch)
tree2eddfb173bf626d8835596b4871a51d52576bfb6
parentacaa2a4fbb88bc1812f8b72505dd28c040841f3a (diff)
downloadcpython-3d02b09deec09f0aedf0ea23eeed87e327b696c5.tar.gz
Adde getmargin() method to calculate the width of the margin.
-rw-r--r--Lib/lib-stdwin/wdbsrcwin.py3
-rwxr-xr-xLib/stdwin/wdbsrcwin.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/Lib/lib-stdwin/wdbsrcwin.py b/Lib/lib-stdwin/wdbsrcwin.py
index c5de9283e0..6c5cde8e02 100644
--- a/Lib/lib-stdwin/wdbsrcwin.py
+++ b/Lib/lib-stdwin/wdbsrcwin.py
@@ -70,6 +70,9 @@ class DebuggerSourceWindow(srcwin.SourceWindow):
s = s + ' '
return s
+ def getmargin(self):
+ return stdwin.textwidth('[' + `self.linecount+1` + ']->B ')
+
def setlineno(self, newlineno):
if newlineno != self.curlineno:
oldlineno = self.curlineno
diff --git a/Lib/stdwin/wdbsrcwin.py b/Lib/stdwin/wdbsrcwin.py
index c5de9283e0..6c5cde8e02 100755
--- a/Lib/stdwin/wdbsrcwin.py
+++ b/Lib/stdwin/wdbsrcwin.py
@@ -70,6 +70,9 @@ class DebuggerSourceWindow(srcwin.SourceWindow):
s = s + ' '
return s
+ def getmargin(self):
+ return stdwin.textwidth('[' + `self.linecount+1` + ']->B ')
+
def setlineno(self, newlineno):
if newlineno != self.curlineno:
oldlineno = self.curlineno