vi: fix adjustment of buffer on partial file read