Avoid wrapping in inline editors when they get too narrow

For #5865.