diff --git a/ChangeLog b/ChangeLog index 66a2ce5..0499d48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-09-19 Joe Neeman + + * 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 * 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 (), - lo, hi); - + lo = lower_bound (newline_locations_, + pos_str0, + less (), + lo, hi); if (*pos_str0 == '\n') lo--;