We have observed a new memory effect related to metastable states of a moving charge-density wave (CDW) in K0.30MoO3. At 45 K we find that the transient oscillations seen in the leading edge of current or voltage pulses are influenced by the duration of the preceding pulse. For repetitive pulses this results in an unusual waveform where the phase of the last oscillation in a pulse is anomalously large and phase locked to the trailing edge of the pulse. The phase of the initial oscillation remains phase locked to the leading edge of the pulse. If one changes the pulse width in a string of repetitive pulses, the anomalous shape of the waveform is attained by the second pulse at the new width. These results suggest that information about the width of a pulse is contained in the phase configuration of the pinned charge-density-wave state present between pulses. The effect of a pulse, on average, is to advance the CDW phase by integral multiples of 2π.