diff options
| author | Mattias Andrée <maandree@operamail.com> | 2014-06-13 12:35:09 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2014-06-13 12:35:09 +0200 |
| commit | cf2af6ef4a6754f324706d55aaf011f9e15e7ce7 (patch) | |
| tree | 7ef1f88fe2b69d03f8496e358e91aed01eee919f | |
| parent | bump year (diff) | |
| download | pytagomacs-cf2af6ef4a6754f324706d55aaf011f9e15e7ce7.tar.gz pytagomacs-cf2af6ef4a6754f324706d55aaf011f9e15e7ce7.tar.bz2 pytagomacs-cf2af6ef4a6754f324706d55aaf011f9e15e7ce7.tar.xz | |
make editring limit configurable
Signed-off-by: Mattias Andrée <maandree@operamail.com>
| -rw-r--r-- | src/editor.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/editor.py b/src/editor.py index d5fb96a..af1055f 100644 --- a/src/editor.py +++ b/src/editor.py @@ -63,6 +63,11 @@ KILLRING_LIMIT = 50 :int The maximum size of the killring ''' +EDITRING_LIMIT = 100 +''' +:int The maximum size of the editring +''' + atleast = lambda x, minimum : (x is not None) and (x >= minimum) ''' @@ -203,7 +208,7 @@ class TextArea(): if height <= 0: height += int(screen_size[0]) - top + 1 self.fields, self.datamap, self.left, self.top, self.width, self.height = fields, datamap, left, top, width - 1, height self.innerleft = len(max(self.fields, key = len)) + 3 - self.killring, self.editring = Killring(limit = KILLRING_LIMIT), Editring() + self.killring, self.editring = Killring(limit = KILLRING_LIMIT), Editring(limit = EDITRING_LIMIT) data = lambda field : datamap[field] if field in datamap else '' self.lines = [Line(self, self.fields[y], data(self.fields[y]), y) for y in range(len(self.fields))] self.areawidth = self.width - self.innerleft |
