ON HOGMANAY, less than three months ago, when the leaders of both the SNP and the Greens agreed to act as witnesses at the newly legalised gay wedding ceremony of Susan and Gerrie Douglas-Scott, we might have thought a watershed had been reached in Scottish attitudes to lesbians and homosexuals.

Similarly, we might have dared to hope that the rise of Nicola Sturgeon to Bute House or Humza Yousaf to Ministerial office would sound a death knell for sexism and racism.

Instead, we have seen our First Minister's image manipulated by a tabloid newspaper to appear as if wearing a revealing outfit in a rock video, our Europe and External Relations Minister likened to an Islamist terrorist by a European parliamentarian, and now the leader of the Conservative Party in Scotland subjected to vile homophobic abuse on social media.

But out of this disheartening events we can take some hope, for in all of these cases the condemnation has been swift and decisive. Perhaps distaste for hate offences are finally reaching the mainstream.

Yesterday's despicable outburst on Twitter reached a new low for foul-mouthed ignorance as the tweet attacked Ruth Davidson, leader of the Scottish Tories, not for her politics but as a lesbian. The account, as is so often the case in the bizarre, cowardly universe of social media, was under an assumed name and was later blocked, but the fact that it was bedecked by SNP and "45" logos led to the party launching an investigation and pledging to discipline the member involved.

The Tweeter involved even tried to defend himself, saying initially: "Boohoo, support the woman that hates Scotland and supported no. She is a gobby Tory. She is well off, she hates working class, she loves Cameron."

However, once he was identified by other social media users he phoned Ms Davidson's office and offered what she called "genuine contrition." By then the SNP had pledged to suspend him pending disciplinary action, and Ms Sturgeon and Mr Yousaf were unequivocal in their condemnation. It is to be hoped that disciplinary action will be more robust than the slap on the wrist administered to the SNP's book-burners in Paisley who are now restored to council office after their exploits setting fire to the Smith Commission.

Mr Yousaf, who had been likened by UKIP MEP David Coburn to the terrorist preacher Abu Hamza, tweeted of the attack on Ms Davidson: "Utterly disgraceful. Will investigate if member. Personally will push for expulsion. Zero-tolerance homophobia."

The First Minister told MSPs she "condemned unreservedly the vile homophobic abuse directed at Ruth Davidson" and pledged disciplinary action.

For her part Ms Davidson handled yesterday with style, grace and restraint, saying she raised such abuse on occasion because "it is important that young Lesbian, Gay, Bisexual and Transgender people see that such abuse doesn't have to be borne. It's not OK. People don't just have to sit there and take it. You are allowed to challenge it."

We support these sentiments without reservation or qualification. Maybe recent days really will be a watershed in Scottish public opinion. We hope so.