diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2024-03-12 10:44:53 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-12 10:44:53 +0800 |
| commit | ac8cd5368db83cced9bc049ceb50c21cb8a4f743 (patch) | |
| tree | 8e0a97c534a79c97aa881002fd847be677e66f9c /src/nvim/lua/treesitter.c | |
| parent | b02a4d8ac39bafdbfd490bfbab35e3202e6f709c (diff) | |
| download | rneovim-ac8cd5368db83cced9bc049ceb50c21cb8a4f743.tar.gz rneovim-ac8cd5368db83cced9bc049ceb50c21cb8a4f743.tar.bz2 rneovim-ac8cd5368db83cced9bc049ceb50c21cb8a4f743.zip | |
refactor: use ml_get_buf_len() in API code (#27825)
Diffstat (limited to 'src/nvim/lua/treesitter.c')
| -rw-r--r-- | src/nvim/lua/treesitter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 25a753b179..6d6ef6c7b9 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -371,7 +371,7 @@ static const char *input_cb(void *payload, uint32_t byte_index, TSPoint position return ""; } char *line = ml_get_buf(bp, (linenr_T)position.row + 1); - size_t len = strlen(line); + size_t len = (size_t)ml_get_buf_len(bp, (linenr_T)position.row + 1); if (position.column > len) { *bytes_read = 0; return ""; |