From c665dfd73e330213008f6422c25b5a115a541776 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sun, 24 Jul 2016 23:01:28 -0400 Subject: Issue #19198: IDLE: tab after initial whitespace should tab, not autocomplete. Fixes problem with writing docstrings at lease twice indented. --- Lib/idlelib/idle_test/test_autocomplete.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lib/idlelib/idle_test/test_autocomplete.py') diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py index a14c6db349a..97bfab5a569 100644 --- a/Lib/idlelib/idle_test/test_autocomplete.py +++ b/Lib/idlelib/idle_test/test_autocomplete.py @@ -97,6 +97,11 @@ class AutoCompleteTest(unittest.TestCase): self.assertIsNone(autocomplete.autocomplete_event(ev)) del ev.mc_state + # Test that tab after whitespace is ignored. + self.text.insert('1.0', ' """Docstring.\n ') + self.assertIsNone(autocomplete.autocomplete_event(ev)) + self.text.delete('1.0', 'end') + # If autocomplete window is open, complete() method is called self.text.insert('1.0', 're.') # This must call autocomplete._make_autocomplete_window() -- cgit v1.2.3