dannyob / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

can't get index, via java API: diff_main(String text1, String text2) #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use java API: diff_main(String text1, String text2).
    text1 = "this is a test";
    text2 = "this is a test A";   
2. LinkedList<Diff> diff = diff_main(String text1, String text2);
3. in "LinkedList<Diff> diff", I can't get "index" of in Diff Class.

What is the expected output? What do you see instead?
expected output: index = 16
but index always equal -1

What version of the product are you using? On what operating system?
version:20071106, java 
OS: windows XP

Please provide any additional information below.

Original issue reported on code.google.com by jiangbo...@gmail.com on 29 Dec 2007 at 2:55

GoogleCodeExporter commented 9 years ago
sorry, this is not issue. if I use diff_addIndex(LinkedList<Diff> diffs), I can 
get
the index info.

Original comment by jiangbo...@gmail.com on 29 Dec 2007 at 3:02

GoogleCodeExporter commented 9 years ago
Correct, the field is there, but it's not computed by default since most 
applications
don't need it.

Original comment by neil.fra...@gmail.com on 12 Jan 2008 at 12:58