Comments (7)
Small Rust repro:
// old
#[cfg_attr(feature = "dox")]
bitflags! {
pub struct AnchorHints: u32 {
}
}
// new
bitflags! {
#[cfg_attr(feature = "dox")]
pub struct AnchorHints: u32 {
}
}
Even smaller lisp repro:
;; old
foo
(x y)
;; new
(foo x y)
from difftastic.
Interesting, this is probably related to #30, but for the opening delimiter rather than the closing delimiter.
Thanks for the report. #30 is going to be fiddly to fix, so it might take me a while :)
from difftastic.
Should've added that this is with some older git version after 0.10.1 and also latest git (as of now). Main change with latest git is the addition of the slight syntax highlighting (nice btw!).
from difftastic.
@sdroege do you have the full file of before and after, or could you point me at the git repo you're using?
from difftastic.
Aha, looks like it's here: https://github.com/gtk-rs/gtk3-rs/blob/master/gdk/src/auto/flags.rs
from difftastic.
So the problem here is that difftastic prefers moving the delimiters rather than considering the attribute moved. The following program does not have the same problem:
// old
#[cfg_attr(feature = "dox")]
bitflags! {
#[foo(bar)]
pub struct AnchorHints: u32 {
}
}
// new
bitflags! {
#[foo(bar)]
#[cfg_attr(feature = "dox")]
pub struct AnchorHints: u32 {
}
}
This is a really interesting case. Perhaps the cost metrics for moving delimiters should consider the first child of the list.
from difftastic.
No longer repros on trunk. There's been a bunch of improvements to list nesting recently.
from difftastic.
Related Issues (20)
- Parsable output
- Provide automatic display options that consider terminal width, etc.
- Error: "index out of bounds: the len is 20 but the index is 20" HOT 4
- Unchanged HTML reported as changed HOT 1
- No option to diff hidden files in directories HOT 1
- Word differ returns out-of-bounds column numbers HOT 1
- tree-sitter-lua is out-dated
- index out of bounds: the len is X but the index is X', src/display/inline.rs:115:21
- Bad error recovery from (incorrect) C preprocessor error
- Inline diff is ignoring unchanged lines between hunks
- "index out of bounds" error, panic in side_by_side.rs HOT 2
- Crash inside eshell with memory allocation error HOT 5
- Output file paths as relative to current working directory
- Feature Request: Compare Subdirectories, ignore directory name difference
- Elm diff shows no syntactic changes for changes to doc comments
- `--language` command line argument is not supported
- difft does shows single/double quote as a diff for python HOT 3
- Include line number in patch diff header
- difftastic do not show color in fzf preview HOT 1
- Dynamic sublanguages (injections)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from difftastic.