def AddDiagnosticSyntaxMatch(line_num, column_num, line_end_num=None, column_end_num=None, is_error=True):
 group = (u'YcmErrorSection' if is_error else u'YcmWarningSection')
 (line_num, column_num) = LineAndColumnNumbersClamped(line_num, column_num)
 if ((not line_end_num) or (not column_end_num)):
  return GetIntValue(u"matchadd('{0}', '\\%{1}l\\%{2}c')".format(group, line_num, column_num))
 (line_end_num, column_end_num) = LineAndColumnNumbersClamped(line_end_num, (column_end_num - 1))
 column_end_num += 1
 return GetIntValue(u"matchadd('{0}', '\\%{1}l\\%{2}c\\_.\\{{-}}\\%{3}l\\%{4}c')".format(group, line_num, column_num, line_end_num, column_end_num))

def AddDiagnosticSyntaxMatch ( line_num , column_num , line_end_num = None , column_end_num = None , is_error = True ) : group = ( u'YcmErrorSection' if is_error else u'YcmWarningSection' ) ( line_num , column_num ) = LineAndColumnNumbersClamped ( line_num , column_num ) if ( ( not line_end_num ) or ( not column_end_num ) ) : return GetIntValue ( u"matchadd('{0}', '\\%{1}l\\%{2}c')" . format ( group , line_num , column_num ) ) ( line_end_num , column_end_num ) = LineAndColumnNumbersClamped ( line_end_num , ( column_end_num - 1 ) ) column_end_num += 1 return GetIntValue ( u"matchadd('{0}', '\\%{1}l\\%{2}c\\_.\\{{-}}\\%{3}l\\%{4}c')" . format ( group , line_num , column_num , line_end_num , column_end_num ) )
highlight a range in the current window starting from included to excluded .