summaryrefslogtreecommitdiffstats
path: root/Lib/stdwin
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/stdwin
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/stdwin')
-rwxr-xr-xLib/stdwin/wdbsrcwin.py3
1 files changed, 3 insertions, 0 deletions
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