But the last vote was not exactly close.
Regarding vote. What vote? The sham vote pulled by an outgoing congress MP in a parliament session that was obstructed by his own party members. The ones who refused a vote (and haven't still) on important economic & tax legislations. It was his own party with him as a minister that was in power for several years when the initial supreme court decision was made. And that the biggest obstacle to indian parliament passing any gay rights legislation would not be BJP but rather from smaller parties which are trying to appease minority religious groups. While section 377 gets all the attention, the Indian parliament is also working on a transgender rights bill, which given indian context and historical discrimination faced by them is of higher a importance. Indian politics due to the fact that its a functioning democracy is complicated.
https://en.wikipedia.org/wiki/Rights_of_Transgender_Persons_...
Section 377 was enacted by british, the only opponents to its repeal in the current pending supreme court case are Catholic and Muslim organizations not a single hindu organization. And oh several ministers in the ruling party have called on supreme court to render it unconstitutional. So get your facts straight.