 		(indent-to (+ col want))))
 	  (forward-line 1))
       (set-marker end nil))
-    (goto-char (- (point-max) pos))
+    (goto-char (if dir pos
+		 (- (point-max) pos)))
     (py-keep-region-active)))
 
 (defun py-outdent-left (start end arg)

     (if m
	 (list (min p m) (max p m) arg)
       (list p m arg))))
  (let ((pos (- (point-max) (point)))
	(end (save-excursion
	       (goto-char (or end (1+ start)))
	       (and (not (bolp))
		    (forward-line 1))
	       (set-marker (make-marker) (point))))
	col want)
    (goto-char start)
    (beginning-of-line)
    (unwind-protect

		(indent-to (- col want))))
	  (forward-line 1))
      (set-marker end nil))
    (goto-char (if dir pos
		 (- (point-max) pos)))
    (py-keep-region-active)))

