remove trailing space
use the current buffer