diff options
| author | Albert Cervin <albert@acervin.com> | 2024-01-31 15:39:08 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-01-31 15:39:08 +0100 |
| commit | 9e3c3310422f9253b7255b18b1dcdb7f20af3e35 (patch) | |
| tree | 4b7d9e69aa8c662ca39b0b9efa399269ef148874 /src/dged/syntax.c | |
| parent | cea4819feb55559408c3b58872f6e3e6a32ae0e5 (diff) | |
| download | dged-9e3c3310422f9253b7255b18b1dcdb7f20af3e35.tar.gz dged-9e3c3310422f9253b7255b18b1dcdb7f20af3e35.tar.xz dged-9e3c3310422f9253b7255b18b1dcdb7f20af3e35.zip | |
Handle empty buffers in highlighting
Diffstat (limited to 'src/dged/syntax.c')
| -rw-r--r-- | src/dged/syntax.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dged/syntax.c b/src/dged/syntax.c index 403cabe..e7828a5 100644 --- a/src/dged/syntax.c +++ b/src/dged/syntax.c @@ -279,6 +279,10 @@ static void update_parser(struct buffer *buffer, void *userdata, return; } + if (buffer_is_empty(buffer)) { + return; + } + // take results and set text properties // TODO: can reuse the cursor TSQueryCursor *cursor = ts_query_cursor_new(); |
