-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
None
-
None
I sometimes have to deal with files which contain blocks of duplicated code. Or do those have subtle differences? I'd like to find out.
To do this, it would be helpful if Creator could show me a diff for two regions of the same file, e.g. the lines following line 100 compared to the lines following line 600.
How could this function be triggered? Some ideas:
- Open a file in an editor.
- From the menu, select "Tools" -> "Diff" -> "Diff file against itself.
A diff viewer appear which - of course - does not show any differences yet. - In a spinbox above the diff viewer, enter a line offset.
The offset determines which lines will be compared to each other, e.g. if set to "100", line 1 will compared to line 101 and so forth.
- Open the same file in two editors side by side.
- From the menu, select "Tools" -> "Diff" -> "Diff currently visible lines.
- Select some lines.
- Right-click to open the context menu.
- From the menu, select "Compare selection to lines..."
A small dialog opens. - In the dialog, enter the number of the first line that will be compared to the selection.
Of course I'm open for better suggestions.