( buffer_number )
| 314 | |
| 315 | |
| 316 | def GetTextProperties( buffer_number ): |
| 317 | if not VimIsNeovim(): |
| 318 | return [ |
| 319 | DiagnosticProperty( |
| 320 | int( p[ 'id' ] ), |
| 321 | p[ 'type' ], |
| 322 | int( p[ 'lnum' ] ), |
| 323 | int( p[ 'col' ] ), |
| 324 | int( p[ 'length' ] ) ) |
| 325 | for p in vim.eval( |
| 326 | f'prop_list( 1, ' |
| 327 | f'{{ "bufnr": { buffer_number }, ' |
| 328 | '"end_lnum": -1, ' |
| 329 | '"types": [ "YcmErrorProperty", ' |
| 330 | '"YcmWarningProperty" ] } )' ) ] |
| 331 | else: |
| 332 | ext_marks = vim.eval( |
| 333 | f'nvim_buf_get_extmarks( { buffer_number }, ' |
| 334 | f'{ YCM_NEOVIM_NS_ID }, ' |
| 335 | '0, ' |
| 336 | '-1, ' |
| 337 | '{ "details": 1 } )' ) |
| 338 | return [ DiagnosticProperty( |
| 339 | int( id ), |
| 340 | extra_args[ 'hl_group' ], |
| 341 | int( line ) + 1, # Neovim uses 0-based lines and columns |
| 342 | int( column ) + 1, |
| 343 | int( extra_args[ 'end_col' ] ) - int( column ) ) |
| 344 | for id, line, column, extra_args in ext_marks ] |
| 345 | |
| 346 | |
| 347 | def AddTextProperty( buffer_number, |
nothing calls this directly
no test coverage detected