summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/gui/displayable.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index cbd77fe4..28526d7a 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -153,19 +153,13 @@ class Displayable(EnvironmentAware, FileManagerAware, CursesShortcuts):
 				wid = maxx - x
 
 			if x < 0 or y < 0:
-				raise ValueError("Starting point below zero!")
+				self.fm.notify("Warning: Subwindow origin below zero for <%s> "
+					"(x = %d, y = %d)" % (self, x, y), bad=True)
 
-			#if wid < 1 or hei < 1:
-			#	raise OutOfBoundsException("WID and HEI must be >=1!")
-
-			if x + wid > maxx and y + hei > maxy:
-				raise ValueError("X and Y out of bounds!")
-
-			if x + wid > maxx:
-				raise ValueError("X out of bounds!")
-
-			if y + hei > maxy:
-				raise ValueError("Y out of bounds!")
+			if x + wid > maxx or y + hei > maxy:
+				self.fm.notify("Warning: Subwindow size out of bounds for <%s> "
+					"(x = %d, y = %d, hei = %d, wid = %d)" % (self,
+					x, y, hei, wid), bad=True)
 
 		window_is_cleared = False