- SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
- return *unsmob_moment (ly_caar (entry)) - start_moment_;
+ Rational infty;
+ infty.set_infinite (1);
+ Moment m (infty);
+
+ if (Music_wrapper_iterator::ok ())
+ m = min (m, Music_wrapper_iterator::pending_moment ());
+
+ /*
+ In case event_idx_ < 0, we're not initted yet, and the wrapped
+ music expression determines the starting moment.
+ */
+ if (quote_ok ())
+ m = min (m, vector_moment (event_idx_) - start_moment_);
+
+ return m;
+}
+
+Moment
+Quote_iterator::vector_moment (int idx) const
+{
+ SCM entry = scm_c_vector_ref (event_vector_, idx);
+ return *unsmob_moment (scm_caar (entry));