kyoh86 / vim-ripgrep

A plugin for Vim8/Neovim to search text by ripgrep (rg) asynchronously
MIT License
30 stars 3 forks source link

Fix an invalid col because the start is based 0. #4

Closed rbtnn closed 2 years ago

rbtnn commented 2 years ago
vim-ripgrep>rg --json fu
{"type":"begin","data":{"path":{"text":"test\\path.vim"}}}
{"type":"match","data":{"path":{"text":"test\\path.vim"},"lines":{"text":"function s:suite.before()\n"},"line_n
umber":6,"absolute_offset":121,"submatches":[{"match":{"text":"fu"},"start":0,"end":2}]}}
{"type":"match","data":{"path":{"text":"test\\path.vim"},"lines":{"text":"endfunction\n"},"line_number":13,"abs
olute_offset":438,"submatches":[{"match":{"text":"fu"},"start":3,"end":5}]}}
{"type":"match","data":{"path":{"text":"test\\path.vim"},"lines":{"text":"function s:suite.after()\n"},"line_nu
...(snip)...