Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intra-line (word diff?) highlighting #33

Closed
vlsi opened this issue Sep 6, 2021 · 2 comments
Closed

Intra-line (word diff?) highlighting #33

vlsi opened this issue Sep 6, 2021 · 2 comments

Comments

@vlsi
Copy link

vlsi commented Sep 6, 2021

I know the approach in difftastic is tree-based diff, so "intra-line" and "word-diff" might not be the right terms, however, it would be nice to see the modifications within the lines. For instance: function call added, or operand added, or variable name change.

For instance, see line 514 in #32:

@@ -511,20 +511,21 @@ create or replace package body rte_data_capture is
               from table(vars.all_columns) c,
                    (select column_value data_field from table(vars.oldnew_columns)
                     union
-                    select column_value data_field from table(vars.change_tracker_columns)) cv
+                    select column_name data_field from table(vars.change_tracker_columns)) cv

column_value -> column_name is puzzling to spot in difftastic

@Wilfred Wilfred closed this as completed in a39d4b3 Sep 6, 2021
@Wilfred
Copy link
Owner

Wilfred commented Sep 6, 2021

When difftastic understands the syntax, it can do a good job. For files that it treats as text, I agree that word-level diffing is a reasonable approach :)

@vlsi
Copy link
Author

vlsi commented Sep 7, 2021

Thanks for the quick fix.

The diff now is way better:
sample plsql diff

Wilfred pushed a commit that referenced this issue Feb 3, 2022
The dsl function calls that resulted from these methods were confusing
even for me (or at the least required some extra mental effort to figure
out the order of operations) and this pattern is not used in other
Tree-sitter grammars which would probably make it confusing for anyone
new that might want to make a change to tree-sitter-hack.
Wilfred pushed a commit that referenced this issue Apr 14, 2022
editing function declaration and returns
Wilfred pushed a commit that referenced this issue Jul 4, 2022
- Remove unnecessary call to malloc in `stack_deserialize`
- Add missing octal escape sequences
- Fix erratum in prefixed_command_literals (and add tests)
Wilfred pushed a commit that referenced this issue Jul 11, 2022
gurjeet pushed a commit to gurjeet/difftastic that referenced this issue Sep 20, 2022
vquelque pushed a commit to vquelque/difftastic that referenced this issue Apr 5, 2023
grunweg pushed a commit to grunweg/difftastic that referenced this issue May 5, 2023
…tree-sitter-cli-0.20.6

Bump tree-sitter-cli from 0.20.4 to 0.20.6
ewen-lbh pushed a commit to ewen-lbh/difftastic that referenced this issue May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants