Don't use non-intra-only lossy codecs when editing. At least, not directly. They are not thought out for that.
Convert them to lossless codecs such as UT Video or Lagarith or Huffyuv. Or use them through frameserving with avs and fake avi files. The latter option will be much slower than the former and somewhat unreliable if you keep editing the avs file with the NLE open, but otherwise much safer than just loading lossy codecs which aren't made only of keyframes.
As a final explanation, lossy codecs which are fine to use do include intra-only lossy avc (lossless avc is a no go in NLEs), generally with a very high bitrate to retain the quality, and codecs such as MJPEG meant for bait-and-switch usage. However with recent enough hardware and decently sized HDDs, the lossless codecs option is much better, both for quality and speed and easiness.
For any further understanding, please Read ErMaC & AbsoluteDestiny's Friendly AMV Guides Lovingly Overhauled Largely by Zarxrax