end
function test_enter_on_bottom_line_scrolls_down()
io.write('\ntest_enter_on_bottom_line_scrolls_down')
-- display a few lines with cursor on bottom line
App.screen.init{width=25+30, height=60}
Lines = load_array{'abc', 'def', 'ghi', 'jkl'}
Line_width = App.screen.width
Cursor1 = {line=3, pos=2}
Screen_top1 = {line=1, pos=1}
Screen_bottom1 = {}
Zoom = 1
local screen_top_margin = 15 -- pixels
local line_height = math.floor(15*Zoom) -- pixels
App.draw()
local y = screen_top_margin
App.screen.check(y, 'abc', 'F - test_enter_on_bottom_line_scrolls_down/baseline/screen:1')
y = y + line_height
App.screen.check(y, 'def', 'F - test_enter_on_bottom_line_scrolls_down/baseline/screen:2')
y = y + line_height
App.screen.check(y, 'ghi', 'F - test_enter_on_bottom_line_scrolls_down/baseline/screen:3')
-- after hitting the enter key the screen scrolls down
App.run_after_keychord('return')
check_eq(Screen_top1.line, 2, 'F - test_enter_on_bottom_line_scrolls_down/screen_top')
check_eq(Cursor1.line, 4, 'F - test_enter_on_bottom_line_scrolls_down/cursor:line')
check_eq(Cursor1.pos, 1, 'F - test_enter_on_bottom_line_scrolls_down/cursor:pos')
y = screen_top_margin
App.screen.check(y, 'def', 'F - test_enter_on_bottom_line_scrolls_down/screen:1')
y = y + line_height
App.screen.check(y, 'g', 'F - test_enter_on_bottom_line_scrolls_down/screen:2')
y = y + line_height
App.screen.check(y, 'hi', 'F - test_enter_on_bottom_line_scrolls_down/screen:3')