There are two aspects to diplomatic immunity. One, that a diplomat cannot be prosecuted or arrested by the host government for any crime he commits IN THE COURSE OF DISCHARGING HIS DUTY AS A DIPLOMAT. In any other criminal case, like say a diplomat getting drunk and shooting people to death in his personal capacity, immunity will be waived by both countries, and he will be arrested. (Some clueless trolls sporting American flags were boasting earlier that even if the diplomat shoots all the judges of the supreme court, he still has immunity, and that if his immunity is violated, America will nuke India and so on. Despite such idiots and their laughable misunderstandings, there is much more to diplomatic immunity than meets the eye, and isn't simply a law that a diplomat can do what he wants.)
Now the second aspect, which is more relevant to this particular case, is this. All serving diplomats are under the jurisdiction of their home country only, and the host country's courts have no jurisdiction over them, and therefore they are free to do any contempt of court they want, because they don't come under the jurisdiction of the courts. However, when the Italian diplomat personally came to the supreme court and signed an affidavit, he was submitting to the authority of the supreme court. If not, he had no business visiting an Indian court. So once he submits a signed affidavit in a court, he cannot argue that the court had no jurisdiction over him. This is strictly between the court and the ambassador - not between India and Italy, or the Govt of India and the Govt of Italy. The supreme court is only bound by Indian laws, and not by international laws or Vienna conventions TO A PERSON UNDER ITS jurisdiction. The Italian ambassador came under its jurisdiction by his own voluntary act. The SC is well within its jurisdiction now to initiate contempt proceedings against him. That is the will of the supreme court - heck, it is the will of even the lawyer who was arguing for the marines', as the title of the thread says. Vienna conventions and international laws apply to the government an armed forces, but not to an Indian court - if anybody is under the jurisdiction of the court, he will be tried according to Indian law. Diplomats are NOT under the jurisdiction of the suoreme court, unless they walk into the court and sign an affidavit under oath to the court. Which is what this idiot did.