Commit Graph

546 Commits (5d2c14a3f9920d7b8f8e5445e9fcda334e3fcf09)
 

Author SHA1 Message Date
Wilfred Hughes 5d2c14a3f9 Entering a list should set the prev_novel state to the open delimiter 2021-07-22 00:07:09 +07:00
Wilfred Hughes 61446c916a Prefer marking large subtrees as novel rather than largely novel
This solves the "replace function A with completely different function
B" problem, even if they start with the same function keyword.
2021-07-21 01:05:01 +07:00
Wilfred Hughes 4c33f34025 Decrease highest edge score
This is easier to reason about and reduces risk of overflow.
2021-07-20 20:29:12 +07:00
Wilfred Hughes 3e73845090 Tweak contiguous change scores so they're closer together
This gives flexibility to add more types of edges.
2021-07-20 20:26:43 +07:00
Wilfred Hughes 63147be63c Add test for multline string 2021-07-20 20:09:58 +07:00
Wilfred Hughes c184a7da8f Improve string literal parsing and add unit tests 2021-07-20 20:07:21 +07:00
Wilfred Hughes c48e8e2977 Improve JS and JSON parsing 2021-07-20 01:18:39 +07:00
Wilfred Hughes 7bd8afc439 Improve handling of = and & in lisps 2021-07-20 01:09:29 +07:00
Wilfred Hughes aa28b26f48 Basic support for non-UTF8 source files 2021-07-20 00:46:12 +07:00
Wilfred Hughes 2d9efe15a0 Fix another crash on empty files
Git history with file additions/removals should now work.
2021-07-20 00:22:01 +07:00
Wilfred Hughes 9711cdf94e Fix another crash on empty files 2021-07-20 00:19:00 +07:00
Wilfred Hughes 816288149e Fix a crash on empty files 2021-07-20 00:14:21 +07:00
Wilfred Hughes 6bec8b7e2c Don't crash on files without an extension 2021-07-20 00:10:58 +07:00
Wilfred Hughes 27069e0a9e Tweak section divider to only show under content
Previously we covered the whole termainl width, including column numbers and
beyond the width of the content.

Closes #22
2021-07-20 00:04:59 +07:00
Wilfred Hughes 49ec9d68cc Improve OCaml parsing for := and !
Fixes #20
2021-07-19 23:04:03 +07:00
Wilfred Hughes cd24331270 Tweak wording 2021-07-19 00:03:49 +07:00
Wilfred Hughes 04eaa39864 Note common types of files that make it crash 2021-07-19 00:01:43 +07:00
Wilfred Hughes a6a1a009ca Use the separate file name provided when git passes arguments
Git writes both LHS and RHS to temporary file paths, which differ from
the path in the repo.
2021-07-18 23:56:06 +07:00
Wilfred Hughes 6fb01cf7d3 Lex string literals with escaped delimiters 2021-07-18 23:42:36 +07:00
Wilfred Hughes ad81a86419 + is a legal symbol constituent in elisp 2021-07-18 23:40:46 +07:00
Wilfred Hughes 88b0ec2283 & is legal in elisp
It's used for variadic functions.
2021-07-18 23:25:56 +07:00
Wilfred Hughes 75839a1185 Support # and . in lisps
Elisp uses # for sharp-quoting, and some Schemes use # for vector
literals.

. is used for dotted pair notation.
2021-07-18 23:18:55 +07:00
Wilfred Hughes bb55867119 Add installation instructions
Fixes #11
2021-07-18 22:40:56 +07:00
Wilfred Hughes 28d5e51911 Fix crash on multibyte characters
Previously parsing would proceed byte at a time, which would crash if
the source contained multibyte characters. Instead, try all the
regular expression patterns, and jump to the next nearest match.
2021-07-18 22:34:52 +07:00
Wilfred Hughes 841dba8789 Improve debug display of position on Syntax values 2021-07-18 22:27:17 +07:00
Wilfred Hughes 5f4ab7c292 Support using difftastic with built-in git commands 2021-07-18 15:01:32 +07:00
Wilfred Hughes 15397fd1b5 Simplify usage with difftool 2021-07-18 14:24:35 +07:00
Wilfred Hughes 56133dadc8 Add TODO 2021-07-18 00:49:17 +07:00
Wilfred Hughes f8aaccceac Fix typo 2021-07-18 00:44:42 +07:00
Wilfred Hughes b77adf6c46 Prefer using the .info() helper 2021-07-18 00:00:02 +07:00
Wilfred Hughes 3bbfe83cb0 Rename id to unique_id 2021-07-17 23:59:56 +07:00
Wilfred Hughes 2b1ad3c64b Update test whose output changed in abddca0
These results are equivalent in any case.
2021-07-17 19:04:41 +07:00
Wilfred Hughes 2c8577811d More TODOs 2021-07-17 19:02:48 +07:00
Wilfred Hughes 8a8d711367 Fix calculating newline offsets that aren't on the first line
This led to bad positions in comment word highlighting
2021-07-17 18:58:58 +07:00
Wilfred Hughes 3a37453c1a Add TODO 2021-07-17 18:46:07 +07:00
Wilfred Hughes abddca0b46 Dijkstra visits nodes in distance order, so we only need predecessors
The first time we see a node, we've found the shortest path to it. Add
it to the predecessors then, and don't visit it again.
2021-07-17 17:53:59 +07:00
Wilfred Hughes aa87085b95 Remove unused dependency 2021-07-17 15:35:43 +07:00
Wilfred Hughes 1c9ece441a Improve --help 2021-07-17 14:18:40 +07:00
Wilfred Hughes cdc70dd784 Add ReplaceComment edge and display a word diff between the comments 2021-07-17 13:55:41 +07:00
Wilfred Hughes 1bdd68029c Allow a single change to return multiple match positions 2021-07-17 12:26:19 +07:00
Wilfred Hughes 42d186c237 OCaml allows ; as punctuation too
Fixes #19
2021-07-17 00:02:59 +07:00
Wilfred Hughes 8f17f86fce Define a heper function to create MatchedPos 2021-07-16 00:21:40 +07:00
Wilfred Hughes 6de4464599 Recognise - as OCaml punctuation
- needs to occur as the last item in a [..] regexp.
2021-07-15 23:56:20 +07:00
Wilfred Hughes 00fcd4652a Recognise # and <- as OCaml punctuation
Fixes #18
2021-07-15 23:54:53 +07:00
Wilfred Hughes ae4f404d1a Fix an issue where atoms were marked as comments
Currently atoms and comments are not printed differently, so this bug
was not user-visible.
2021-07-15 00:22:58 +07:00
Wilfred Hughes 97816fb5a3 Remove dead code tracking moves 2021-07-14 22:32:56 +07:00
Wilfred Hughes f153735011 Clippy fixes 2021-07-13 23:37:18 +07:00
Wilfred Hughes a2e36cac46 Add more two-character lexems to Rust parser 2021-07-13 23:36:52 +07:00
Wilfred Hughes 4c79267602 Roll version 2021-07-13 23:27:17 +07:00
Wilfred Hughes 8b382e4356 Improved OCaml handling
Fixes #17
Fixes #15
2021-07-13 22:52:13 +07:00