]> granicus.if.org Git - python/commit
Tweak the goto file/line command (in the right button menu in PyShell
authorGuido van Rossum <guido@python.org>
Tue, 7 Mar 2000 16:25:11 +0000 (16:25 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 7 Mar 2000 16:25:11 +0000 (16:25 +0000)
commitba23bed340bab31b8c233f27acb181516f9de60c
tree867b060e2d817e3f6897d2ff74c79006df2152b5
parent9611e0b4620988310c15122e3d14deadb2efbb35
Tweak the goto file/line command (in the right button menu in PyShell
and output windows) so that it if it doesn't succeed with the line
at the cursor, it tries the line before that.  This is handy with
tracebacks, where my natural tendency is to click in the displayed
source line rather than in the file/line indicator just above it.
Now I can indulge this tendency.

I factored out a helper and changed the error handling so that a
non-existing file is treated as if the line didn't match -- this is
handy because some function calls (e.g. "foo.bar(1)") match the grep
pattern.
Tools/idle/OutputWindow.py