org-agenda.el (org-agenda-todo): Restore the window correctly
commit6ba3b2d03d277f6e8b67f9ca5ef6de19476bfc09
authorBastien Guerry <bzg@altern.org>
Tue, 18 Mar 2014 19:54:02 +0000 (18 20:54 +0100)
committerBastien Guerry <bzg@altern.org>
Tue, 18 Mar 2014 19:54:02 +0000 (18 20:54 +0100)
tree5f32cae695205a039b4406851c01f80e82ee9f6a
parentc16e09e158367fdf7191f80c5b6a2d788ed099eb
org-agenda.el (org-agenda-todo): Restore the window correctly

* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.

`org-agenda-change-all-lines' is narrowing to the line it needs to
update.  In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed.  We
use `save-window-excursion' to ensure the window state is restored
correctly.

Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.
lisp/org-agenda.el