Wilfred Hughes
Wilfred Hughes
See `prev_is_contiguous` in syntax.rs.
This is substantially improved by removing the 'keep first unchanged node' optimisation, but two cases remain:  
This last case may not be fixable: the inner `|` is an or pattern, not a case.
This could probably be treated as another nested slider case.
So something like this would work? ``` --- src/tree_sitter_parser.rs +++ src/tree_sitter_parser.rs @@ -857,6 +857,14 @@ src/tree_sitter_parser.rs --- Rust 857 857 let position = nl_pos.from_offsets(node.start_byte(), node.end_byte()); 858 858 let mut content...
I've added a note in the README about the challenges here, and I see e.g. https://github.com/banga/git-split-diffs/issues/36 also suggests that patch files would be useful. I think this would be possible....
LHS line 149 in d06f357c93873d673c9328f501347fc64f759eaf also has this problem.
Small repro before: ``` fn split_string_by_codepoint() { if true { x; } } ``` After ``` fn split_string_by_codepoint() { if true { if pad_last { x; } } } ```...
Perhaps this should be part of slider correction
Nested slider correction basically works, but it hurts lisps. I'm trying to avoid having a per-language flag 'is lisp', that feels like reinventing a parser. Need a way of characterising...