Update field/tag textbox as autocomplete lines are selected

The main effect of this is that Tab now accepts the selected
autocomplete entry.

Closes #341 and #417