To answer your question in detail, let's go back into History
The year was 1744 A.D. There was no countrry named "Nepal" at this time. There were just bunch of small kingdoms ruled by different kings and rulers. Among these bunch of Kingdoms, There was a small nation called "Gorkha" and it had a Badass king named
Prithvi Narayan Shah . He was preety ambitious and had a dream to expand his Kingdom far beyond his current territory.
He was sworn in as King of Gorkha on 3 April 1743. One year after he become King, in 1744, with his ambitious nature and Gorkhali Army he attacked adjacent Kingdom named "Nuwakot". He failed but didn't accept defeat, he attacked again and in his second attempt, won the kingdom of Nuwakot and annexed it into his
Kingdom of Gorkha.
At this point, he said to himself "HolyShit! That's awesome. I can haz all the kingdoms". So off he went attacking and annexing every small kingdom around Gorkha. Slowly after annexing one kingdom after another, he reached the "Kathmandu Valley", which was Union of Three small kingdoms namely "Kantipur", "Lalitpur" and "Bhaktapur" at that time and collectively called "Nepal" (This where the "term" Nepal comes from). Prithivi Narayan Shah had tough time defeating "Nepal". I won't go into that in detail but you can read about his Conquest of "Kathmandu Valley" in Wiki:
Unification of Nepal
After his conquest of the Kathmandu Valley, Prithvi Narayan Shah conquered other smaller countries south of the valley to keep other smaller fiefdoms near his Gurkha state out of the influence and control of the British rule. After his kingdom spread out from north to south, he made Kantipur the capital of expanded country, and renamed it Nepal from its original name of Gorkha. After this he turned his attention towards the east. The Sena kingdom of Choudandi was conquered by 1773 A.D. and Vijaypur, another Sena kingdom, was annexed shortly thereafter. Prithvi Narayan Shah formally established Nepal as a country and the Kingdom of Nepal was officially born in 1769 AD.
In the year 1769 AD when PN Shah and later his youngest son
Bahadur Shah of Nepal finally completed their annexation, the boundary of their kingdom was some like below:
This was "Nepal" at that point of time. From Tista river in the East to Sutlej in the West.
Then came the British
After they had consolidated there powers in India, they wanted to annex more. They saw some Hills in the Northern part of India and moved forward but were stopped by the Gorkhali Army and thus happened the
http://en.wikipedia.org/wiki/Ang...(1814–1816). The Gorkhali Army fought bravely and did not allow British to capture entire Nepal but had to loose some parts of its country. After that War, boundary of Nepal was again redrawn and this is what was left:
This is the current boundary of Nepal.
100 years after that, Gandhi Ji Kicked out the British and Nehru's "Non-aligned Movement" happened. He said he will not invade any country and will not get invaded, So, he left Nepal without invading because at that point of time Nepal was not British India and thought to be Independent Nation.
Then few years down the line "Nehru's daughter Indira Gandhi" invaded Sikkim. This sent a chill down the spin of Nepal's King Mahendra. He thought if India can so easily Invade Sikkim they can do same with Nepal and thus he began spreading "Anti-India" Sentiment in Nepal. The whole country was indoctrinated with "One Nepal - One Identity" feeling which was pretty much everything anti-India. Even though Nepal has 81% Hindu population, it DOES NOT identify itself with India's Hindu. The modern history of Nepal after 1950s is filled with Kings and Commies which theoretically were against each other but jointly against India and thus never wanted to be part of Union of India
P.S., in 1769 A.D. when PN Shah was done with his conquest and had already built his empire, The Company Rule in India was finally starting. There were British in India at that time but they were more focused on consolidating their power in India. Had PN Shah's conquest process happened 100 years later, there would have been no Nepal because the British would never allowed any other Kingdom go on conquest on such large scale.
P.P.S. King Mahendra's Policy of "One Nation" was solely responsible of all India Bashing you see today in Nepal and citizens that grew out of that policy see India as a country which is always ready to annex Nepal which has become kind of buffer on why India is not annexing Nepal because India can never Justify the annexation. Unlike in Sikkim where the refrendum voted 97% in favour of India, that would never happen in Nepal and being the Largest Democracy in World i don't see how in foresable future India can annex Nepal without being undemocratic.
I hope that answers your question.