terminal history size adjustment