aboutsummaryrefslogtreecommitdiffstats
path: root/src/editor.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-09-10 10:56:51 +0200
committerMattias Andrée <maandree@operamail.com>2013-09-10 10:56:51 +0200
commit354ca2cd4dadf38bc700cdab0ebcb00d2cf10f0c (patch)
tree94466807806fd33cdf3766ea9a2ef249c08c2a1c /src/editor.py
parentmisc (diff)
downloadpytagomacs-354ca2cd4dadf38bc700cdab0ebcb00d2cf10f0c.tar.gz
pytagomacs-354ca2cd4dadf38bc700cdab0ebcb00d2cf10f0c.tar.bz2
pytagomacs-354ca2cd4dadf38bc700cdab0ebcb00d2cf10f0c.tar.xz
print number of hidden lines
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/editor.py')
-rw-r--r--src/editor.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/editor.py b/src/editor.py
index 5551b8d..d2117cb 100644
--- a/src/editor.py
+++ b/src/editor.py
@@ -427,8 +427,6 @@ class TextArea():
@param postredrawer:()→void Method to call after redaring screen
'''
- self.status('unmodified')
-
modified = False
override = False
@@ -458,8 +456,14 @@ class TextArea():
self.alert(error_message)
def update_status():
- self.status(('modified' if modified else 'unmodified') + (' override' if override else ''))
+ below = len(self.lines) + 2 - self.height
+ mode_text = 'modified' if modified else 'unmodified'
+ ins_text = ' override' if override else ''
+ above = ' +%i↑' % self.offy if self.offy > 0 else ''
+ below = ' +%i↓' % below if below > 0 else ''
+ self.status(mode_text + ins_text + above + below)
+ update_status()
while True:
if atleast(oldmark, 0) or atleast(self.mark, 0):
self.lines[self.y].draw()