Who knows, if the Soviets invaded Afghanistan, maybe they could've prevented the communist government from being overthrown by the Mujaheddin. Though of course, the jihadi rebels could've given the USSR enough trouble that they would've quit and failed to keep their puppet government alive anyways, much like with the USA in the Vietnam War.
I heard that some wealthy Saudi businessman (What's his name? Something bin Laden) claimed that he would've personally gone to Afghanistan to fight off the Soviets if they invaded. I wonder how this guy would fare as a jihadist warlord, he would've made a lot of connections, maybe even with the CIA sending him money and guns.