Small optimization to redrawing when changing buffers and added documentation to bufwin.c and bufwin.h