MCPcopy Index your code
hub / github.com/ycm-core/YouCompleteMe / GetUnsavedAndSpecifiedBufferData

Function GetUnsavedAndSpecifiedBufferData

python/ycm/vimsupport.py:129–145  ·  view source on GitHub ↗

Build part of the request containing the contents and filetypes of all dirty buffers as well as the buffer |included_buffer| with its filepath |included_filepath|.

( included_buffer, included_filepath )

Source from the content-addressed store, hash-verified

127
128
129def GetUnsavedAndSpecifiedBufferData( included_buffer, included_filepath ):
130 """Build part of the request containing the contents and filetypes of all
131 dirty buffers as well as the buffer |included_buffer| with its filepath
132 |included_filepath|."""
133 buffers_data = { included_filepath: GetBufferData( included_buffer ) }
134
135 for buffer_object in vim.buffers:
136 if not BufferModified( buffer_object ):
137 continue
138
139 filepath = GetBufferFilepath( buffer_object )
140 if filepath in buffers_data:
141 continue
142
143 buffers_data[ filepath ] = GetBufferData( buffer_object )
144
145 return buffers_data
146
147
148def GetBufferNumberForFilename( filename, create_buffer_if_needed = False ):

Callers

nothing calls this directly

Calls 3

GetBufferDataFunction · 0.85
BufferModifiedFunction · 0.85
GetBufferFilepathFunction · 0.85

Tested by

no test coverage detected