Template repo for tiny cross-platform apps that can be modified on phone, tablet or computer.
-- returns:
-- 	* a float between 0 and 1 regarding the relative position of the top line on screen
--     * a float between 0 and 1 regarding the relative position of the bottom line on screen
compute_scrollbar = function(state)
	local top = state.line_cache[state.screen_top1.line].start_screen_line_index
	local screen_bottom1 = Text.screen_bottom1(state)
	local bot = state.line_cache[screen_bottom1.line].start_screen_line_index
	return (top-1)/state.screen_line_count, bot/state.screen_line_count
end