Browse Source

Fix semi-crash if log list gets too long

Matthias Vogelgesang 7 years ago
parent
commit
2816e9df08
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cockpit

+ 2 - 2
cockpit

@@ -69,7 +69,7 @@ class LineList(object):
     def add_line(self, s, attr=0):
         self.lines.append((s, attr))
 
-        if len(self.lines) > self.height:
+        if len(self.lines) > self.height - 1:
             self.lines = self.lines[1:]
 
         self.redraw()
@@ -367,7 +367,7 @@ class Application(object):
         machine = StateMachine()
 
         quit = Action('q', 'Quit', self.on_quit, machine.QUIT)
-        sync = Action('s', 'Sync data', self.on_sync, machine.SYNC)
+        sync = Action('s', 'Sync', self.on_sync, machine.SYNC)
         flatcorrect = Action('f', 'Flat correct', self.on_flat_correct, machine.FLATCORRECT)
         clean = Action('c', 'Clean', self.on_clean, machine.CLEAN)
         optimize = Action('o', 'Optimize', self.on_optimize, machine.OPTIMIZE)