On Tue, 2006-09-19 at 14:22 +0200, Han-Wen Nienhuys wrote:
> Tapio Tuovila wrote:
> > Hello,
> > it seems that in 2.9.18 generated pdf files all the textedit URIs point
> > to the 1st row of the .ly code while in 2.9.17 these seemed to be OK.
> > Also the console error messages show the problematic spots of the code,
> > but insist that all the problems are located in the first row of the source.
> >
> > Here two snippets in the middle of a pdf-file, first with 2.9.18 and
> > second with 2.9.17.
> >
> > greetings, Tapio
> >
> > (examples:
> >
> > /A<</S/URI
> > /URI(textedit:///home/tapu/Documents/Nuotteja/Rameau/Gavotti/gavotti.ly:1:36:43)>>
> > /Subtype/Link>>endobj
> >
>
> Joe, could this be related to the binsearch chagnes? Source-file.cc
> uses it to look up line numbers.
My fault indeed. source-file.cc should have lower_bound, not
binary_search.
2006-09-19 Joe Neeman <[EMAIL PROTECTED]>
* lily/source-file.cc (get_line): lower_bound, not
binary_search. Fixes problem where point-and-click would
always point to the first line.
diff --git a/ChangeLog b/ChangeLog
index 66a2ce5..0499d48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-19 Joe Neeman <[EMAIL PROTECTED]>
+
+ * lily/source-file.cc (get_line): lower_bound, not
+ binary_search. Fixes problem where point-and-click would
+ always point to the first line.
+
2006-09-19 Han-Wen Nienhuys <[EMAIL PROTECTED]>
* lily/*.cc: idem.
diff --git a/lily/source-file.cc b/lily/source-file.cc
index c846c9a..56b2e57 100644
--- a/lily/source-file.cc
+++ b/lily/source-file.cc
@@ -335,11 +335,10 @@ Source_file::get_line (char const *pos_s
if (newline_locations_[hi - 1] < pos_str0)
return hi;
- lo = binary_search (newline_locations_,
- pos_str0,
- less<char const*> (),
- lo, hi);
-
+ lo = lower_bound (newline_locations_,
+ pos_str0,
+ less<char const*> (),
+ lo, hi);
if (*pos_str0 == '\n')
lo--;
_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond