When I purchased a few years ago, I began my search with about the same amount of time left on my lease as you. I'm glad I started searching well before my lease was up. I ended up buying in June with a few extra months left on my lease. I was able to sublet within a week using craigslist at nearly full rent, too. Your landlord likely can't stop you from subletting, but check with them first about possibly getting out of the lease. With fewer people buying homes, the rental market is stronger than it was when I was renting.
Also, remember that you the buyer, not the seller, specify the close date in your contract. Most lenders will let you push close out to up to 90 days without penalty. A seller might be open to giving you a credit should they need to close early, especially given the market.
I'm working with a buyer now who is in a similiar situation. I'd hate for her to miss out on the bulk