Injection seeding by a single-mode continuous-wave (cw) laser provides a convenient way to achieve narrowband tunable operation of a laser with a broad spectral gain profile, or of an optical parametric oscillator (OPO). Continuous single-mode tunability of the laser or OPO output usually requires the length of the optical cavity to be controlled as the injection-seeding wavelength is scanned. We report a novel variant on established methods of locking the optical cavity length to the seed wavelength. Our approach takes advantage of the resonance properties of an optical cavity. When the cavity is in resonance with the cw seed radiation, the total intensity of that radiation reflected off the cavity displays a pronounced dip; this intensity dip can be used as a locking signal to reset the cavity length piezoelectrically during each interval between the pump pulses that excite the laser or OPO. Our active cavity-locking scheme is realized in the case of a ring-cavity OPO, incorporating periodically poled lithium niobate (PPLN), pumped at 1.064 μm by a single-mode pulsed Nd:yttrium-aluminum-garnet laser and injection-seeded at its signal wavelength by a 1.55 μm single-mode tunable diode laser. The coherent infrared output of this injection-seeded PPLN OPO is shown to be continuously tunable, with an optical bandwidth of ∼130 MHz (0.0045 cm-1) and excellent spatial beam quality.