def _ask_user(a, formatted):
 try:
  rv = _vim.eval(('inputlist(%s)' % _vim.escape(formatted)))
  if ((rv is None) or (rv == '0')):
   return None
  rv = int(rv)
  if (rv > len(a)):
   rv = len(a)
  return a[(rv - 1)]
 except _vim.error:
  return None
 except KeyboardInterrupt:
  return None

def _ask_user ( a , formatted ) : try : rv = _vim . eval ( ( 'inputlist(%s)' % _vim . escape ( formatted ) ) ) if ( ( rv is None ) or ( rv == '0' ) ) : return None rv = int ( rv ) if ( rv > len ( a ) ) : rv = len ( a ) return a [ ( rv - 1 ) ] except _vim . error : return None except KeyboardInterrupt : return None
asks the user using inputlist() and returns the selected element or none .