Browse files

Pop open victory buffer on success. Put victory buffer in vimgolf mod…

…e to enable keys. EOM
  • Loading branch information...
1 parent 869fee4 commit 324516f95b8173963f32eb1eb2ff80ce9a75049b @timvisher committed Dec 1, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 emacs/vimgolf.el
View
3 emacs/vimgolf.el
@@ -148,6 +148,7 @@ unknown key sequence was entered).")
"Refresh the contents of the keystrokes log buffer."
(let ((deactivate-mark nil))
(with-current-buffer (get-buffer-create vimgolf-keystrokes-buffer-name)
+ (vimgolf-mode t)
(erase-buffer)
(insert (format "Challenge ID: %s\n%s\n\n" vimgolf-challenge (vimgolf-challenge-url vimgolf-challenge))
(format "Keystrokes (%d):\n\n" (vimgolf-count-keystrokes))
@@ -193,6 +194,8 @@ unknown key sequence was entered).")
(vimgolf-diff))
(defun vimgolf-right-solution ()
+ (delete-other-windows)
+ (switch-to-buffer vimgolf-keystrokes-buffer-name)
(message "Hurray! You solved %s in %d keystrokes!" vimgolf-challenge (vimgolf-count-keystrokes)))
(defun vimgolf-submit ()

0 comments on commit 324516f

Please sign in to comment.