   "Show smart window."
   (interactive)
   (if (and smartwin-mode
-           smartwin-previous-buffer
            (not (smartwin-find-smart-win)))
       (let ((window (smartwin-get-smart-win)))
         (if (and smartwin-previous-buffer
-                 (not (eq smartwin-previous-buffer (window-buffer window)))
                  (buffer-live-p smartwin-previous-buffer))
-            (set-window-buffer window smartwin-previous-buffer))
-        )))
+            (if (not (eq smartwin-previous-buffer (window-buffer window)))
+                (set-window-buffer window smartwin-previous-buffer))
+          (set-window-buffer window (get-buffer "*scratch*"))))))
 
 (defun smartwin-hide (&optional force)
   "Hide smart window.

        (if smartwin-mode
            (progn
              (push pair display-buffer-alist)
              ;;(ad-activate 'switch-to-buffer)
              ;;(ad-activate 'switch-to-buffer-other-window)
              ;;(ad-activate 'windmove-do-window-select)
              ;;(ad-activate 'evil-window-move-very-top)
              ;;(ad-activate 'evil-window-move-far-left)

;; 2. add exceptions config
;; 3. process wrong scroll when enlarge smart window
;; 4. window-text-change-functions
;; 5. smart window scroll problem

;;; Code:

