In those days (18th/early 19th century) the regimental Colonel, Lieutenant Colonel and Major (of whom there was only one back then) each commanded their own company in addition to their regimental duties (the remaining companies being commanded by Captains, not Majors as became the norm later). This double-hatting didn't work too well as the field officers spent most of their time doing what field officers do, not what company officers do. The Colonel had indeed by this time become largely a ceremonial appointment - he "owned" the regiment but no more, indeed he might well be a General or a member of the Royal Family and only see the regiment very occasionally (in effect the situation today in the British army). The Colonel's company came to be commanded by the Captain-Lieutenant, an acting rank originally but from 1772 a recognised rank.