Wilfred Hughes
cebd377163
Apply inline colours to inline diff
2021-08-04 23:36:09 +07:00
Wilfred Hughes
c39b2677e0
Tweak whitespace in inline diff
2021-08-04 23:30:38 +07:00
Wilfred Hughes
85fae3cfe9
Inline display: print RHS context after changed lines
2021-08-04 23:30:13 +07:00
Wilfred Hughes
cbea00e6a6
Add todo
2021-08-04 23:25:27 +07:00
Wilfred Hughes
c43206624d
cargo fmt
2021-08-04 00:17:07 +07:00
Wilfred Hughes
01b5197b0a
Adding context boundary calculations to inline display
2021-08-03 23:59:40 +07:00
sogaiu
3b80140427
Update README
2021-08-03 14:26:26 +07:00
Wilfred Hughes
f2629abe2c
Experimenting with colouring line numbers based on LHS/RHS modified state
2021-08-01 23:55:24 +07:00
Wilfred Hughes
cc77dae1f0
Silence clippy warning
2021-08-01 23:27:32 +07:00
Wilfred Hughes
07605434cc
Use bold for inline display for consistency with side-by-side
2021-08-01 17:05:05 +07:00
Wilfred Hughes
d3c50a7a09
Don't display RHS lines before the first change of a hunk
2021-08-01 17:03:38 +07:00
Wilfred Hughes
83a840869c
Initial red/green printing of changed lines for inline display
2021-08-01 16:40:07 +07:00
Wilfred Hughes
8c97fc2484
Pad groups in both modes and print lines of content in inline mode
2021-08-01 16:26:18 +07:00
Wilfred Hughes
e9e072af01
Remove completed todo
2021-08-01 16:19:28 +07:00
Wilfred Hughes
f54ef7d477
Add TODO
2021-08-01 16:15:54 +07:00
Wilfred Hughes
4a618f3c16
Prefer LineNumber wrappers when passing line numbers to formatters
2021-08-01 16:14:25 +07:00
Wilfred Hughes
c46ef92cd5
Stub implementation for inline display
2021-08-01 16:12:44 +07:00
Wilfred Hughes
af7fdadf26
Define an inline diff module
2021-08-01 16:07:45 +07:00
Wilfred Hughes
3e0b3b6d41
Define an environment variable for controlling output format
2021-08-01 16:06:15 +07:00
Wilfred Hughes
ae9df2c55a
Move side-by-side diff display to a separate module
2021-08-01 15:40:47 +07:00
Wilfred Hughes
1ceaecfa25
Remove --width from CLI parameters
...
This is the first step in refactoring for inline diffs.
2021-08-01 15:30:12 +07:00
Wilfred Hughes
7a61048056
Simplify pattern match for edge costs
2021-07-31 23:33:44 +07:00
Wilfred Hughes
2e6666041f
Contiguous novel atoms are always better than changing depth of novel lists
2021-07-31 23:32:23 +07:00
Wilfred Hughes
04c37b3865
Ensure NovelTree edges have costs consistent with novel atoms
...
This was broken in 573cd32a01 , which
only increased novel atom/delimiter costs.
2021-07-31 21:52:54 +07:00
Wilfred Hughes
4161d80f2f
Simplify text display of language type
2021-07-31 17:30:37 +07:00
Wilfred Hughes
34f084d8f1
Calculate content width based on visible lines
2021-07-31 17:21:55 +07:00
Wilfred Hughes
e67732bab9
Improve contiguous novel logic
...
Inspect the previous syntactic node, then get the atom position, open
delimiter position or close delimiter position depending on the
context.
2021-07-31 16:54:14 +07:00
Wilfred Hughes
017c9fb6d8
Define a num_ancestors helper
2021-07-31 16:38:15 +07:00
Wilfred Hughes
444256b3d5
Silence a lossless cast lint from clippy
2021-07-31 12:07:52 +07:00
Wilfred Hughes
e4feb734d4
Formatting
2021-07-31 12:07:46 +07:00
Wilfred Hughes
8de611ae0a
Also store the previous syntax node in SyntaxInfo
2021-07-31 12:03:56 +07:00
Wilfred Hughes
692ad90073
Adding TODO
2021-07-31 11:37:02 +07:00
Wilfred Hughes
ca5e757065
Document OrdVertex fields and improve names
2021-07-31 11:26:03 +07:00
Wilfred Hughes
7ac433acb4
Prefer named struct fields
2021-07-31 11:20:09 +07:00
Wilfred Hughes
7b87434635
Document the purpose of the prev_novel fields
2021-07-31 11:10:17 +07:00
Wilfred Hughes
4f4dfb846e
Fix typo
2021-07-31 11:04:59 +07:00
Wilfred Hughes
59f4b9e0d7
Reorder fields in Vertex
2021-07-31 11:01:39 +07:00
Wilfred Hughes
332aff3810
Don't bother considering ReplacedComment for identical comments
...
It will never be on the shortest path.
2021-07-31 10:57:14 +07:00
Wilfred Hughes
1553533559
Add a sample file exercising contiguous item logic
2021-07-31 10:50:02 +07:00
Wilfred Hughes
5b440a69b3
Link to edges directly
2021-07-31 10:29:48 +07:00
Wilfred Hughes
a4751b98f1
Fix a parsing issue with -> in Rust
2021-07-31 01:25:16 +07:00
Wilfred Hughes
d39dad5bd3
Remove unnecessary clone
2021-07-31 01:15:23 +07:00
Wilfred Hughes
f8a8465f16
Fix some clippy lints from the pedantic category
2021-07-31 01:14:11 +07:00
Wilfred Hughes
689f352046
cargo fmt
2021-07-31 01:01:17 +07:00
Wilfred Hughes
ad9f72d6b4
Run latest clippy on all targets and fix issues
2021-07-31 00:59:21 +07:00
Wilfred Hughes
838626e163
Add some doc comments to dijkstra module
2021-07-31 00:23:34 +07:00
Wilfred Hughes
573cd32a01
Prefer matching comments that are similar
...
Previously, we'd match up any pair of comments with a levenstein
distance of 0.4 or more. This was reasonably effective, but misssed
opportunities even more precise diffs.
Instead, prefer the comment matching with the highest levenshtein
distance.
We still only highlight word-level changes for comments with a
levenshtein of 0.4 or more.
Closes #27
2021-07-30 22:54:30 +07:00
Wilfred Hughes
76c7f35d56
Add module doc comments
2021-07-30 01:23:38 +07:00
Wilfred Hughes
0dba462fb3
Don't expose style functions that aren't used externally
2021-07-30 01:13:39 +07:00
Wilfred Hughes
de9ca2feb1
Improve doc comment wording
2021-07-30 01:11:15 +07:00