summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-31 06:42:58 +0200
committerhut <hut@lavabit.com>2010-03-31 06:42:58 +0200
commitc325316f5b1e870a592753178206ad8868b30653 (patch)
treeb58c2f320acedae0c62bf1b5f1f9752ea5a7b707 /ranger
parente2b8008ab1ea1d1d69dcb348f36ba3c28ef2cc6a (diff)
downloadranger-c325316f5b1e870a592753178206ad8868b30653.tar.gz
Abort loading operations when pressing ^C rather than quitting
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/keys.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index c9afbc00..eed77db4 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -195,7 +195,15 @@ def initialize_commands(map):
 	map('ZZ', 'ZQ', fm.exit())
 	map(ctrl('R'), fm.reset())
 	map('R', fm.reload_cwd())
-	map(ctrl('C'), fm.exit())
+	@map(ctrl('C'))
+	def ctrl_c(arg):
+		try:
+			item = arg.fm.loader.queue[0]
+		except:
+			arg.fm.notify("Type Q or :quit<Enter> to exit Ranger")
+		else:
+			arg.fm.notify("Aborting: " + item.get_description())
+			arg.fm.loader.remove(index=0)
 
 	map(':', ';', fm.open_console(cmode.COMMAND))
 	map('>', fm.open_console(cmode.COMMAND_QUICK))
022-06-03 14:17:41 -0700 extract a couple of files' href='/akkartik/text.love/commit/search.lua?id=0d52962b3e6f91e458fbf858e62e684494373af8'>0d52962 ^
5aae527 ^
0d52962 ^
5aae527 ^
0d52962 ^
5aae527 ^
0d52962 ^

5aae527 ^

0d52962 ^
5aae527 ^

0d52962 ^





5aae527 ^

0d52962 ^
5aae527 ^

0d52962 ^




5aae527 ^



0d52962 ^
5aae527 ^

3b36093 ^
5aae527 ^
0d52962 ^


5aae527 ^
0d52962 ^
5aae527 ^
0d52962 ^
5aae527 ^
0d52962 ^

5aae527 ^

0d52962 ^
5aae527 ^

0d52962 ^





5aae527 ^

0d52962 ^
5aae527 ^

0d52962 ^




5aae527 ^



0d52962 ^
5aae527 ^

3b36093 ^
5aae527 ^
0d52962 ^













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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114