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

Function ComputeFittingHeightForCurrentWindow

python/ycm/vimsupport.py:524–533  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

522
523
524def ComputeFittingHeightForCurrentWindow():
525 current_window = vim.current.window
526 if not current_window.options[ 'wrap' ]:
527 return len( vim.current.buffer )
528
529 window_width = current_window.width
530 fitting_height = 0
531 for line in vim.current.buffer:
532 fitting_height += len( line ) // window_width + 1
533 return fitting_height
534
535
536def SetFittingHeightForCurrentWindow():

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected