                         state rdebug-window-configuration-state)
   (when (not (eq state rdebug-window-configuration-state))
     ;; Save the previous state.
-    (cond ((eq rdebug-window-configuration-state 'debugger)
+    (cond ((not (eq rdebug-window-configuration-state 'original))
            (setq rdebug-debugger-window-configuration
                  (current-window-configuration)))
           ((eq rdebug-window-configuration-state 'original)

 V - Variables buffer
 W - Watch buffer

 d - go down frame (with numeric argument goes down that many frames)
 u - go up one frame (with numeric argument goes down that many frames)

 ? - This help text.
"))))



(defun rdebug--setup-secondary-window-help-buffer (buf comint-buffer)
  (rdebug-debug-enter "rdebug--setup-secondary-window-help-buffer"
    (with-current-buffer buf
      (rdebug-secondary-window-help-mode)
      (set (make-local-variable 'gud-comint-buffer) comint-buffer)
