Modified autosize plugin to limit the number of lines.