core: fix window/buffer pointers used in command /eval