summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-14 15:15:53 +0200
committerhut <hut@lavabit.com>2011-09-14 15:20:18 +0200
commit98761094d8e9f43fae4342e44c2bcdc6dea59331 (patch)
tree7249bf09a877764fe39cba30bc765ef84ef7ed6f
parentd873a5604911659080acd7ba9788da6698641f4c (diff)
downloadranger-98761094d8e9f43fae4342e44c2bcdc6dea59331.tar.gz
gui.widgets.pager: fixed crash
-rw-r--r--ranger/gui/widgets/pager.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/ranger/gui/widgets/pager.py b/ranger/gui/widgets/pager.py
index 05485189..d1bf5918 100644
--- a/ranger/gui/widgets/pager.py
+++ b/ranger/gui/widgets/pager.py
@@ -111,12 +111,16 @@ class Pager(Widget):
 			if TITLE_REGEXP.match(line):
 				self.color_at(i, 0, -1, 'title', *baseclr)
 		elif self.markup == 'ansi':
-			self.win.move(i, 0)
-			for chunk in ansi.text_with_fg_bg_attr(line):
-				if isinstance(chunk, tuple):
-					self.set_fg_bg_attr(*chunk)
-				else:
-					self.addstr(chunk)
+			try:
+				self.win.move(i, 0)
+			except:
+				pass
+			else:
+				for chunk in ansi.text_with_fg_bg_attr(line):
+					if isinstance(chunk, tuple):
+						self.set_fg_bg_attr(*chunk)
+					else:
+						self.addstr(chunk)
 
 	def move(self, narg=None, **kw):
 		direction = Direction(kw)
'/danisanti/profani-tty/commit/themes/shade?id=6dabbbd54140fb161d2a03d6d3f4fe67585311c6'>6dabbbd5 ^
30b5f112 ^
71679a31 ^

6dabbbd5 ^


6dabbbd5 ^
30b5f112 ^
2f82f50a ^
86c1c388 ^
1a3dc91e ^
30b5f112 ^
6dabbbd5 ^
30b5f112 ^
fbc30231 ^

















cd2458c0 ^

0ae975c2 ^

b21edfaa ^
cd2458c0 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78