 (defun move-text-line-up ()
   "Move the current line up."
   (interactive)
-  (if (move-text--at-last-line-p)
-      (let ((target-point))
-        (kill-whole-line)
-        (forward-line -1)
-        (beginning-of-line)
-        (setq target-point (point))
-        (yank)
-        (unless (looking-at "\n")
-          (newline))
-        (goto-char target-point))
-    (progn (transpose-lines 1)
-           (forward-line -2))))
+    (if (move-text--at-last-line-p)
+        (let ((target-point))
+          (kill-whole-line)
+          (forward-line -1)
+          (beginning-of-line)
+          (setq target-point (point))
+          (yank)
+          (unless (looking-at "\n")
+            (newline))
+          (goto-char target-point))
+      (let ((col (current-column)))
+        (progn (transpose-lines 1)
+               (forward-line -2)
+               (move-to-column col)))))
 
 ;;;###autoload
 (defun move-text-line-down ()

;; Keywords: edit
;; Url: https://github.com/emacsfodder/move-text
;; Compatibility: GNU Emacs 25.1
;; Version: 2.0.5
;;
;;; This file is NOT part of GNU Emacs


           (and
            (move-text--last-line-is-just-newline)
            (move-text--at-penultimate-line-p)))
    (let ((col (current-column)))
      (forward-line 1)
      (transpose-lines 1)
      (forward-line -1)
      (move-to-column col))))

;;;###autoload
(defun move-text-region (start end n)
