summaryrefslogtreecommitdiffstats
path: root/Tools/idle/FormatParagraph.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-06-11 15:03:00 (GMT)
committerGuido van Rossum <guido@python.org>1999-06-11 15:03:00 (GMT)
commit13205609c59845fa37c455839b0ec0030588465b (patch)
treea2209b81e620635a596e8d3153264273f0f46e05 /Tools/idle/FormatParagraph.py
parent5eb992beed03c7b159046214c22a3391ac220059 (diff)
downloadcpython-13205609c59845fa37c455839b0ec0030588465b.zip
cpython-13205609c59845fa37c455839b0ec0030588465b.tar.gz
cpython-13205609c59845fa37c455839b0ec0030588465b.tar.bz2
Tim Peters smart.patch:
EditorWindow.py: + Added get_tabwidth & set_tabwidth "virtual text" methods, that get/set the widget's view of what a tab means. + Moved TK_TABWIDTH_DEFAULT here from AutoIndent. + Renamed Mark's get_selection_index to get_selection_indices (sorry, Mark, but the name was plain wrong <wink>). FormatParagraph.py: renamed use of get_selection_index. AutoIndent.py: + Moved TK_TABWIDTH_DEFAULT to EditorWindow. + Rewrote set_indentation_params to use new VTW get/set_tabwidth methods. + Changed smart_backspace_event to delete whitespace back to closest preceding virtual tab stop or real character (note that this may require inserting characters if backspacing over a tab!). + Nuked almost references to the selection tag, in favor of using get_selection_indices. The sole exception is in set_region, for which no "set_selection" abstraction has yet been agreed upon. + Had too much fun using the spiffy new features of the format-paragraph cmd.
Diffstat (limited to 'Tools/idle/FormatParagraph.py')
-rw-r--r--Tools/idle/FormatParagraph.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/idle/FormatParagraph.py b/Tools/idle/FormatParagraph.py
index 6d2d475..671b303 100644
--- a/Tools/idle/FormatParagraph.py
+++ b/Tools/idle/FormatParagraph.py
@@ -38,7 +38,7 @@ class FormatParagraph:
def format_paragraph_event(self, event):
text = self.editwin.text
- first, last = self.editwin.get_selection_index()
+ first, last = self.editwin.get_selection_indices()
if first and last:
data = text.get(first, last)
comment_header = ''