summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/tab.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ranger/core/tab.py b/ranger/core/tab.py
index bf837df3..0244adec 100644
--- a/ranger/core/tab.py
+++ b/ranger/core/tab.py
@@ -14,14 +14,24 @@ class Tab(FileManagerAware, SettingsAware):
 		self._thisfile = None  # Current File
 		self.history = History(self.settings.max_history_size, unique=False)
 		self.last_search = None
+		self.pointer = 0
 		self.path = abspath(expanduser(path))
 		self.pathway = ()
 		self.fm.signal_bind('move', self._set_thisfile_from_signal, priority=0.1,
 				weak=True)
+		self.fm.signal_bind('tab.change', self._on_tab_change, weak=True)
 
 	def _set_thisfile_from_signal(self, signal):
 		if self == signal.tab:
 			self._thisfile = signal.new
+			if self == self.fm.thistab:
+				self.pointer = self.thisdir.pointer
+
+	def _on_tab_change(self, signal):
+		if self == self.fm.thistab and self.thisdir:
+			# restore the pointer whenever this tab is reopened
+			self.thisdir.pointer = self.pointer
+			self.thisdir.correct_pointer()
 
 	def _set_thisfile(self, value):
 		if value is not self._thisfile:
es <israelvarios@fastmail.fm> 2013-09-17 23:51:43 -0400 Update vim_file_chooser.vim' href='/akspecs/ranger/commit/doc/examples/vim_file_chooser.vim?h=v1.8.1&id=ee35f41d6b41dbf71cb558ecd8c69883738ff98a'>ee35f41d ^
796074b5 ^
ee35f41d ^




58fd4d93 ^




ee35f41d ^
93654aa0 ^
ee35f41d ^

796074b5 ^
ee35f41d ^

93654aa0 ^
ee35f41d ^








ab90d5bb ^
ee35f41d ^


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