Commit 39a33e99 authored by Tal Einat's avatar Tal Einat Committed by GitHub

bpo-35196: Optimize Squeezer's write() interception (GH-10454)

The new functionality of Squeezer.reload() is also tested, along with some general
re-working of the tests in test_squeezer.py.
parent 995d9b92
......@@ -3,6 +3,8 @@ Released on 2019-10-20?
======================================
bpo-35196: Speed up squeezer line counting.
bpo-35208: Squeezer now counts wrapped lines before newlines.
bpo-35555: Gray out Code Context menu entry when it's not applicable.
......
......@@ -317,9 +317,6 @@ class EditorWindow(object):
text.bind("<<zoom-height>>", self.ZoomHeight(self).zoom_height_event)
text.bind("<<toggle-code-context>>",
self.CodeContext(self).toggle_code_context_event)
squeezer = self.Squeezer(self)
text.bind("<<squeeze-current-text>>",
squeezer.squeeze_current_text_event)
def _filename_to_unicode(self, filename):
"""Return filename as BMP unicode so diplayable in Tk."""
......
This diff is collapsed.
......@@ -899,6 +899,9 @@ class PyShell(OutputWindow):
if use_subprocess:
text.bind("<<view-restart>>", self.view_restart_mark)
text.bind("<<restart-shell>>", self.restart_shell)
squeezer = self.Squeezer(self)
text.bind("<<squeeze-current-text>>",
squeezer.squeeze_current_text_event)
self.save_stdout = sys.stdout
self.save_stderr = sys.stderr
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment