Skip to content

Commit 4a12b56

Browse files
Update the sidebar after moving the prompt
1 parent 9cbc0ec commit 4a12b56

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎Lib/idlelib/idle_test/test_pyshell.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def test_output_at_prompt(self):
106106
self.assertEqual(text.get('iomark-6c', 'end-1c'), 'hello\na = (')
107107
self.assertIn('console', text.tag_names('iomark-1c'))
108108
self.assertNotIn('console', text.tag_names('iomark-7c'))
109+
self.assertEqual(shell.shell_sidebar.line_prompts, {3: '>>>'})
109110

110111

111112
class PyShellRemoveLastNewlineAndSurroundingWhitespaceTest(unittest.TestCase):

‎Lib/idlelib/pyshell.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,7 @@ def write(self, s, tags=()):
14491449
# let's find out what they are and be specific.
14501450
if at_prompt and s.endswith('\n'):
14511451
text.tag_add("console", "iomark-1c")
1452+
self.shell_sidebar.update_sidebar()
14521453
if self.canceled:
14531454
self.canceled = False
14541455
if not use_subprocess:

0 commit comments

Comments
 (0)