diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-09-20 13:32:42 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-09-20 13:32:42 +0200 |
| commit | c4cf9bef6b2c221604555e72e07d3b5f14a129d6 (patch) | |
| tree | 091c1face94c55b48b0e15dbda3ce55627a88e7f | |
| parent | list functions with signatures of commands to wrap for undo history (diff) | |
| download | pytagomacs-c4cf9bef6b2c221604555e72e07d3b5f14a129d6.tar.gz pytagomacs-c4cf9bef6b2c221604555e72e07d3b5f14a129d6.tar.bz2 pytagomacs-c4cf9bef6b2c221604555e72e07d3b5f14a129d6.tar.xz | |
begin edit method wrapping
Signed-off-by: Mattias Andrée <maandree@operamail.com>
| -rw-r--r-- | src/editor.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/editor.py b/src/editor.py index f8e21ef..05ea8ec 100644 --- a/src/editor.py +++ b/src/editor.py @@ -121,6 +121,19 @@ class Jump(): # swap_mark(self):bool # override(self, insert, override = True):void +_copy, _cut, _kill, _delete, _erase = Line.copy, Line.cut, Line.kill, Line.delete, line.erase +_yank, _yank_cycle, _move_point = Line.yank, Line.yank_cycle, Line.move_point +_swap_mark, _override = Line.swap_mark, Line.operride + +def full_edit(self, func): + return func(self) + +Line.copy = lambda self : full_edit(self, _copy) +Line.cut = lambda self : full_edit(self, _cut) +Line.kill = lambda self : full_edit(self, _kill) +Line.yank = lambda self : full_edit(self, _yank) +Line.yank_cycle = lambda self : full_edit(self, _yank_cycle) + class TextArea(): ''' GNU Emacs alike text area |
