( bufnr, prop_id = None, prop_types: typing.Union[ typing.List[ str ], str ] = None, first_line = None, last_line = None )
| 71 | |
| 72 | |
| 73 | def ClearTextProperties( |
| 74 | bufnr, |
| 75 | prop_id = None, |
| 76 | prop_types: typing.Union[ typing.List[ str ], str ] = None, |
| 77 | first_line = None, |
| 78 | last_line = None ): |
| 79 | |
| 80 | props = { |
| 81 | 'bufnr': bufnr, |
| 82 | 'all': 1, |
| 83 | } |
| 84 | if prop_id is not None: |
| 85 | props[ 'id' ] = prop_id |
| 86 | |
| 87 | if prop_id is not None and prop_types is not None: |
| 88 | props[ 'both' ] = 1 |
| 89 | |
| 90 | def prop_remove(): |
| 91 | if last_line is not None: |
| 92 | return GetIntValue( f"prop_remove( { json.dumps( props ) }," |
| 93 | f" { first_line }," |
| 94 | f" { last_line } )" ) |
| 95 | elif first_line is not None: |
| 96 | return GetIntValue( f"prop_remove( { json.dumps( props ) }," |
| 97 | f" { first_line } )" ) |
| 98 | else: |
| 99 | return GetIntValue( f"prop_remove( { json.dumps( props ) } )" ) |
| 100 | |
| 101 | if prop_types is None: |
| 102 | return prop_remove() |
| 103 | |
| 104 | if not isinstance( prop_types, list ): |
| 105 | prop_types = [ prop_types ] |
| 106 | |
| 107 | props[ 'types' ] = prop_types |
| 108 | return prop_remove() |
nothing calls this directly
no test coverage detected