REPL: better calculate output height.