Commit Graph

11308 Commits (88222e83c48bb191b78a8098040d55786e6268ca)
 

Author SHA1 Message Date
Wilfred Hughes 88222e83c4 Prepare for patch release with fixed Windows build 2022-09-17 23:55:00 +07:00
Wilfred Hughes d5ae17d3d5 Roll version following release 2022-09-17 20:18:59 +07:00
Wilfred Hughes 5d75d81b1e cargo fmt 2022-09-17 20:17:40 +07:00
Wilfred Hughes ba6d73bcf4 Document Hare in manual and changelog 2022-09-15 09:39:41 +07:00
Wilfred Hughes 39bd04002c
Merge pull request #369 from esawady/hare
Add Hare support
2022-09-15 09:33:07 +07:00
Wilfred Hughes cafd672cc8 Don't underline all changes in plaintext files
Fixes #371
2022-09-15 09:30:16 +07:00
Wilfred Hughes 7d849582ce Pass the detected language to the styling logic 2022-09-15 09:27:34 +07:00
Ember Sawady 7ed685ae52 Add support for Hare 2022-09-13 23:34:16 +07:00
Ember Sawady 6015c77a99 Add 'vendor/tree-sitter-hare/' from commit 'bc26a6a949f2e0d98b7bfc437d459b250900a165'
git-subtree-dir: vendor/tree-sitter-hare
git-subtree-mainline: 3c51f58d8e
git-subtree-split: bc26a6a949
2022-09-13 22:13:13 +07:00
Wilfred Hughes 3c51f58d8e Add Pascal support
Fixes #365
2022-09-13 00:05:23 +07:00
Wilfred Hughes 4c29035138 Add 'vendor/tree-sitter-pascal/' from commit '2fd40f477d3e2794af152618ccfac8d92eb72a66'
git-subtree-dir: vendor/tree-sitter-pascal
git-subtree-mainline: 4319a9db04
git-subtree-split: 2fd40f477d
2022-09-12 23:16:57 +07:00
Wilfred Hughes 4319a9db04 Almost 40 languages now! 2022-09-12 23:14:39 +07:00
Wilfred Hughes 23f6a15838 Update changelog for 888894d0f 2022-09-12 23:03:54 +07:00
Wilfred Hughes aff584af46 Don't crash when the line split boundary is on a combining character
Fixes #358
2022-09-12 23:02:20 +07:00
Wilfred Hughes c03808537a Be defensive against extremely narrow (<10) terminal widths
Previously this would overflow.
2022-09-11 17:37:42 +07:00
Wilfred Hughes 35878fcc2b max_len should always be non-zero 2022-09-11 17:26:55 +07:00
Wilfred Hughes 2e22d19600 Improve variable name 2022-09-11 16:15:48 +07:00
Wilfred Hughes f155a27522 Underline changed words in comments
This makes them easier to spot in larger changes.

Fixes #328
2022-09-10 15:54:04 +07:00
Wilfred Hughes 888894d0f0 Be stricter about text encoding validity
20 was too much for .zip files, where we were only seeing 21 invalid
characters in UTF-8 and 6 in UTF-16.

Improves #358 further
2022-09-10 15:43:11 +07:00
Wilfred Hughes fe30b7d86b Treat .zip files as binary unconditionally
Improves #358
2022-09-10 12:22:58 +07:00
Wilfred Hughes 3a8b0ebaf8
Merge pull request #361 from yuja/add-qml
Add support for QML
2022-09-10 12:07:58 +07:00
Wilfred Hughes 98e42b4362 Add a workaround for parsers leaving trailing \r in comments
Fixes #364
2022-09-10 12:02:22 +07:00
Wilfred Hughes 19ad2fdb61 Improve comment wording 2022-09-10 11:22:15 +07:00
Wilfred Hughes cd6b33ee28 Run the same tab replacement for --dump-ts and --dump-syntax
This is important for getting parse trees consistent with normal
diffing behaviour.
2022-09-09 22:43:13 +07:00
Yuya Nishihara 84f0b25fb6 Add support for QML
QML is a UI language, and its syntax is basically JSON-like structure
+ JavaScript. The tree-sitter parser is named after the upstream grammar
file qmljs.g, but the canonical language name is QML. So I choose Qml as
the Language enum.

https://doc.qt.io/qt-6/qmlapplications.html
2022-09-10 11:38:35 +07:00
Yuya Nishihara 79d594fc56 Add 'vendor/tree-sitter-qmljs/' from commit '3bcf9c4d0911e74307c6d704c1ea242a1e4a2f94'
git-subtree-dir: vendor/tree-sitter-qmljs
git-subtree-mainline: fe5ef8757d
git-subtree-split: 3bcf9c4d09
2022-09-10 11:36:22 +07:00
Wilfred Hughes fe5ef8757d Give novel punctuation a lower edge cost
We'd rather see an unchanged variable name than an unchanged comma.

Fixes #366
2022-09-09 09:47:53 +07:00
Wilfred Hughes ed1e1d870e Disable arm64 build and release
Builds are currently failing, so the release would fail too.

It looks like a compilation issue with tree-sitter-yaml:

    The following warnings were emitted during compilation:

    warning: vendor/tree-sitter-yaml-src/scanner.cc: In member function ‘bool {anonymous}::Scanner::scn_dir_tag_pfx(TSLexer*, TSSymbol)’:
    warning: vendor/tree-sitter-yaml-src/scanner.cc:430:9: warning: case label value is less than minimum value for type
    warning:   430 |         case SCN_FAIL:
    warning:       |         ^~~~

This reverts #353, but I've opened #368.
2022-09-09 09:09:50 +07:00
Wilfred Hughes 28c5461a2f
Merge pull request #359 from ingefredriksen/patch-1
Fix help-value for "--syntax-highlight" argument.
2022-09-09 09:09:00 +07:00
Wilfred Hughes b975a0ee9b
Merge pull request #360 from yuja/unset-locale
Unset LC_ALL and LC_COLLATE to stabilize regression test output
2022-09-09 09:08:47 +07:00
Wilfred Hughes 53d44175cc Install g++ for arm64 too 2022-09-08 22:57:21 +07:00
Wilfred Hughes 9663111eeb Install gcc for arm64 for arm64 CI 2022-09-08 19:02:51 +07:00
Wilfred Hughes ff81f61fd4 Build on arm64 for CI
See also #353, but that only affects builds when doing releases.
2022-09-08 09:39:38 +07:00
Wilfred Hughes 777d6d1f07
Merge pull request #354 from Yeegsing/translation
chinese translation of README.md
2022-09-08 09:20:56 +07:00
Wilfred Hughes 1ac943c1a8
Merge pull request #353 from Niek/patch-1
Add arm64 releases for Linux and macOS
2022-09-08 09:17:02 +07:00
Yuya Nishihara cc2d354768 Unset LC_ALL and LC_COLLATE to stabilize regression test output
I set LC_COLLATE=C in ~/.profile, which appears to change the glob order.
LC_ALL would also affect that, so let's unset both.
2022-09-08 22:37:27 +07:00
Inge Fredriksen f6263ef538
Fix help-value for "--syntax-highlight" argument.
"ON" and "OFF" in uppercase are not accepted. Print help in lowercase to match accepted values.
2022-09-08 10:16:14 +07:00
eric.tao 325f20e336 chinese translation of README.md 2022-09-07 20:19:58 +07:00
Niek van der Maas d767b87f90
Add arm64 releases for Linux and macOS
This adds `aarch64` (arm64) releases for both Linux and macOS.
2022-09-07 09:55:33 +07:00
Wilfred Hughes 4c9a12a905 Clarify position symbols in diff diagrams in manual 2022-09-05 17:20:13 +07:00
Wilfred Hughes 7422cb8f2e Document nested sliders case in manual 2022-09-05 15:06:10 +07:00
Wilfred Hughes 9695d0009e Mention slider fix in changelog 2022-09-02 18:35:04 +07:00
Wilfred Hughes e15244c8f6 Roll version 2022-09-02 18:24:08 +07:00
Wilfred Hughes b104c4be10 Fix sliders in a single global pass
Previously we fixed sliders in each 'possibly changed' region. This
meant that we couldn't fix sliders that needed to move outside the
region. The most common case was code of the form `foo, bar, baz`
where `, baz` was unchanged but we wanted to slide to `,`.

We now call `fix_all_sliders` for the toplevel tree on both
sides. This required some minor changes to the slider logic, as the
unchanged/novel regions could occur at any level of the tree.

(It was probably also the case that we were missing slider
opportunities previously, because we terminated as soon as we found an
outer slider for the nested case.)

This change has no performance impact, probably because tree diffing
is vastly more expensive (O(N^2)) than sliders (O(N)).

Fixes #327
2022-09-02 18:10:09 +07:00
Wilfred Hughes 114235e4da cargo fmt 2022-09-02 18:05:22 +07:00
Wilfred Hughes 8860fabf19 Fix novel_regions_after_unchanged to always append the last region
This is the correct thing to do (and consistent with
novel_regions_before_unchanged), although I haven't found any examples
where it affects the results.
2022-09-02 16:39:11 +07:00
Wilfred Hughes d9fb75981e Make the default value of --background visible in --help 2022-09-02 13:04:34 +07:00
Wilfred Hughes a9866e1187 Mention --list-languages in the manual 2022-09-02 12:58:36 +07:00
Wilfred Hughes c70014a74a Add bold styling to --list-languages to help readability 2022-09-02 12:01:05 +07:00
Wilfred Hughes c0083fdca0 Display file extensions alphabetically 2022-09-02 11:59:30 +07:00