about summary refs log tree commit diff stats
path: root/code/fm.rb
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-20 22:25:01 +0200
committerhut <hut@lavabit.com>2009-07-20 22:25:01 +0200
commit08a843ec650087653f70c6a33f1b963cad4ab967 (patch)
tree351bb9dff20a2f9108c96495d16fc485006e56bc /code/fm.rb
parent6172a793e21e4629cb1167a1b2e095bc9156c688 (diff)
downloadranger-08a843ec650087653f70c6a33f1b963cad4ab967.tar.gz
general cleanups and bugfixes
Diffstat (limited to 'code/fm.rb')
-rw-r--r--code/fm.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/code/fm.rb b/code/fm.rb
index 4f1a5742..793c118a 100644
--- a/code/fm.rb
+++ b/code/fm.rb
@@ -50,7 +50,7 @@ module Fm
 
 	def refresh()
 		begin
-			@pwd.refresh!
+			@pwd.refresh
 			update_pointers
 			draw if CLI.running?
 		rescue
@@ -138,11 +138,7 @@ module Fm
 		bool = false
 		while true
 			exit if terminal_killed?
-			if @pwd.size == 0 or @pwd.pos < 0
-				@pwd.pos = 0
-			elsif @pwd.pos >= @pwd.size - 1
-				@pwd.pos = @pwd.size - 1
-			end
+			@pwd.make_sure_cursor_is_in_range
 
 			begin
 				draw()