#NEWLINE# @ property #NEWLINE# def line_offset( self ) : #NEWLINE# #INDENT# cpos_y = self . pt_cursor_position . y #NEWLINE# return max ( 0 , min ( cpos_y , ( ( self . max_y - self . lines ) + 1 ) ) )