diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2002-12-16 22:25:10 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2002-12-16 22:25:10 (GMT) |
commit | 1bdca5e051a5424aaaaf7968c710d31132a6c335 (patch) | |
tree | ff7772283d2c9b0eaf64d9ad792887888a4a7dc8 /Lib/idlelib | |
parent | cfd4a8b6399edb95a85791390bd79c76056a4d9e (diff) | |
download | cpython-1bdca5e051a5424aaaaf7968c710d31132a6c335.zip cpython-1bdca5e051a5424aaaaf7968c710d31132a6c335.tar.gz cpython-1bdca5e051a5424aaaaf7968c710d31132a6c335.tar.bz2 |
In Shell:
1. If a tab is entered at the prompt, allow it to be backspaced away.
2. Eliminate the beep when hitting <enter> at the prompt.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index a1a4830..4bd766d 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -954,6 +954,8 @@ class EditorWindow: want = ((have - 1) // self.indentwidth) * self.indentwidth ncharsdeleted = 0 while 1: + if chars == sys.ps1: + break chars = chars[:-1] ncharsdeleted = ncharsdeleted + 1 have = len(chars.expandtabs(tabwidth)) @@ -1009,6 +1011,8 @@ class EditorWindow: text.mark_set("insert", first) line = text.get("insert linestart", "insert") i, n = 0, len(line) + if line == sys.ps1: + return "break" while i < n and line[i] in " \t": i = i+1 if i == n: |