More code review fixes

This commit is contained in:
Nathan Byrd 2022-03-28 14:41:12 -05:00
parent abaca6c8ef
commit ec2f6af1d0
3 changed files with 9 additions and 3 deletions

View file

@ -585,8 +585,8 @@ function displayThemedPrompt(name, client, options, cb) {
return callback(null, promptConfig, artInfo);
}
if(options.row != null) {
artInfo.startRow = options.row;
if(!_.isNil(options) && !_.isNil(options.position) && !_.isNil(options.position.row)) {
artInfo.startRow = options.position.row;
if(client.term.termHeight > 0 && artInfo.startRow + artInfo.height > client.term.termHeight) {
// in this case, we will have scrolled
artInfo.startRow = client.term.termHeight - artInfo.height;