This feature has been present since v6.33:

mIRC Options > Display > Options > Editbox lines: Automatic