MCPcopy Create free account
hub / github.com/ycm-core/YouCompleteMe / _IsValidRange

Function _IsValidRange

python/ycm/diagnostic_interface.py:372–386  ·  view source on GitHub ↗
( start_line, start_column, end_line, end_column )

Source from the content-addressed store, hash-verified

370
371
372def _IsValidRange( start_line, start_column, end_line, end_column ):
373 # End line before start line - invalid
374 if start_line > end_line:
375 return False
376
377 # End line after start line - valid
378 if start_line < end_line:
379 return True
380
381 # Same line, start colum after end column - invalid
382 if start_column > end_column:
383 return False
384
385 # Same line, start column before or equal to end column - valid
386 return True

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected