Wilfred Hughes

Results 601 comments of 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: ![Screenshot from 2022-01-15 19-31-20](https://user-images.githubusercontent.com/70800/149646210-0a3fa898-dd90-48f0-8c01-9ff6189d3254.png) ![Screenshot from 2022-01-15 19-30-37](https://user-images.githubusercontent.com/70800/149646212-d7d7b757-0cce-4065-b005-212713d56163.png)

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...