zot / microfts

Small and fast FTS (full text search)
MIT License
32 stars 3 forks source link

offset in search -sexp seems to be the beginning of the line position, not the beginning of the match position #3

Closed jkitchin closed 3 years ago

jkitchin commented 3 years ago

Whenever I use (goto-char offset) it appears that (point) is at the beginning of the line where the match occurred.

zot commented 3 years ago

Added the match offset, format is now

((FILE (POS LINE OFFSET chunk) ... ) ... )
    POS is the 1-based character position of the chunk in the file
    LINE is the 1-based line of the chunk in the file
    OFFSET is the 0-based offset of the first match in the chunk