mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Waste 2.0 has many more options for the undo label.
This commit is contained in:
parent
9ad2752381
commit
316a01093d
1 changed files with 6 additions and 2 deletions
|
@ -85,7 +85,8 @@ class _ScrollWidget:
|
|||
|
||||
|
||||
UNDOLABELS = [ # Indexed by WEGetUndoInfo() value
|
||||
None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style"]
|
||||
None, "", "typing", "Cut", "Paste", "Clear", "Drag", "Style",
|
||||
"Ruler", "backspace", "delete", "transform", "resize"]
|
||||
|
||||
|
||||
class EditText(Wbase.SelectableWidget, _ScrollWidget):
|
||||
|
@ -452,7 +453,10 @@ class EditText(Wbase.SelectableWidget, _ScrollWidget):
|
|||
#if not doundo:
|
||||
# return 0
|
||||
which, redo = self.ted.WEGetUndoInfo()
|
||||
which = UNDOLABELS[which]
|
||||
if which < len(UNDOLABELS):
|
||||
which = UNDOLABELS[which]
|
||||
else:
|
||||
which = ""
|
||||
if which == None:
|
||||
return None
|
||||
if redo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue