some fixes for multiple-mode textinput

#4258 
I'm not sure that this re-introduction of the multiline check is needed. Can't we just add the -1 bit to the adjust_horizontal call instead?