03-fix-context-lines.patch 506 B

1234567891011
  1. --- contrib/python/ipython/py2/IPython/core/debugger.py (revision 12930657)
  2. +++ contrib/python/ipython/py2/IPython/core/debugger.py (working copy)
  3. @@ -408,7 +408,7 @@
  4. ret.append(u'%s(%s)%s\n' % (link,lineno,call))
  5. start = lineno - 1 - context//2
  6. - lines = ulinecache.getlines(filename)
  7. + lines = ulinecache.getlines(filename, frame.f_globals)
  8. start = min(start, len(lines) - context)
  9. start = max(start, 0)
  10. lines = lines[start : start + context]