Implement autofill with a linebuffer.

This feature might still be buggy 'cause the Ayamel CaptionAider page
hasn't been updated to properly exercise it yet.