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

Function BuildQfListItem

python/ycm/vimsupport.py:1481–1499  ·  view source on GitHub ↗
( goto_data_item )

Source from the content-addressed store, hash-verified

1479
1480
1481def BuildQfListItem( goto_data_item ):
1482 qf_item = {}
1483 if 'filepath' in goto_data_item:
1484 qf_item[ 'filename' ] = ToUnicode( goto_data_item[ 'filepath' ] )
1485 if 'description' in goto_data_item:
1486 qf_item[ 'text' ] = ToUnicode( goto_data_item[ 'description' ] )
1487 if 'line_num' in goto_data_item:
1488 qf_item[ 'lnum' ] = goto_data_item[ 'line_num' ]
1489 if 'column_num' in goto_data_item:
1490 # ycmd returns columns 1-based, and QuickFix lists require "byte offsets".
1491 # See :help getqflist and equivalent comment in
1492 # vimsupport.ConvertDiagnosticsToQfList.
1493 #
1494 # When the Vim help says "byte index", it really means "1-based column
1495 # number" (which is somewhat confusing). :help getqflist states "first
1496 # column is 1".
1497 qf_item[ 'col' ] = goto_data_item[ 'column_num' ]
1498
1499 return qf_item

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected