Clever history doesn't really work for me when I use `sudo`

say I type

    $ sudo pacman -Syu 
    $ sudo chown blah blah
    $ sudo pa 
I just get `sudo chown blah blah` instead of `sudo pacman -Syu`

Does anybody know how to fix this? :)

I don't see that behavior for me.

    $ sudo foo
    $ sudo bar
    $ sudo fo
gives me `sudo foo`.

I'm using zsh 5.0.7 (x86_64-apple-darwin14.0.0) on OS X 10.10 (with prezto[1]).

[1]: https://github.com/sorin-ionescu/prezto