summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-27 16:58:21 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-27 16:58:21 (GMT)
commit576136044c54a922d5af3b615e24351e6501e5ee (patch)
tree2eddfb173bf626d8835596b4871a51d52576bfb6 /Lib
parent6fd42b8e921572105f389c377ad1d69da22938cc (diff)
downloadcpython-576136044c54a922d5af3b615e24351e6501e5ee.zip
cpython-576136044c54a922d5af3b615e24351e6501e5ee.tar.gz
cpython-576136044c54a922d5af3b615e24351e6501e5ee.tar.bz2
Adde getmargin() method to calculate the width of the margin.
Diffstat (limited to 'Lib')
-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 c5de928..6c5cde8 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 c5de928..6c5cde8 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