Animation editor - trimming tail

How can I make the animation editor trim the length of an animation to the frame of its last keyframe?

Infuriatingly, if I try to resize my animation by grabbing the last keyframe and moving it leftwards, I am left with non keyframed ‘tails’ on my animation tracks where nothing is happening.

This is crippling my use of the animation editor; I can’t change my animation lengths without recreating them all over!

And yes, I have ensured that I am moving all keyframes. There is no animated property with a later keyframe that could be causing the tails.

I just had the same problem, and this is how I solved it:

when making animations, I had been adding the animation event markers at the beginning and end of my clips, then marking key frames inside them. apparently, adding event markers creates the “tail”. By leaving the animation event markers off and just working with keyframe markers only, I can re-size at will without tails.

I get these ‘tails’ sometimes without using events. I can’t find a solution to get rid of these tails. When these clips are looped, there’s a long pause between each loop and it looks awful. Very frustrating.

I just figured out a completely unintuitive answer to this, but I’ve tried it multiple times and it actually works. I had several animations that I increased the framerate of. this created a tail on the end of my animations that I did not want. If you go into the Animation window for the animation that you are editing, select all of the frames (I did right to left with a shift click to select all of them). once selected, left click on the selected frames and they will automatically trim (or at least mine did). I have no idea if this is intended or a bug, but it worked for me.