v4.3.14
·
240 commits
to master
since this release
Fixed
tokensave_bodyno longer drops the function's outer closing brace (#62) — stored line fields are tree-sitter rows (0-based) butextract_linestreated them as 1-based inclusive, so the slice waslines[start..end_line]exclusive — one line short, lopping off the trailing}. Inner braces were unaffected because they were never on the boundary.extract_linesnow slices inclusively over 0-based row indices, so the returned body is byte-exact usable as anEdittoolold_string.
Changed
tokensave_bodynow exposesstart_line/end_lineas 1-based file line numbers — they were the raw 0-based tree-sitter row indices, which read as "off by one" against the line numbers any editor orEdit-style tool displays. The values now match what users see when they open the file, so the reportedend_lineis the line containing the function's closing brace. The shift is local tohandle_body; other handlers still exposenode.start_lineas-is.