Well.....lol....as Will mentioned deferred maintenance isn't really adding value, but look at it as retaining value, however;
You actually did add to your new after repair value at least by the amount spent and most likely labor.
That's because; you said you bought it under market value.....actually, you probably paid market value at closing, you need to look at the definition of "Market Value" as used in real estate.
A close definition without looking it up;
When there are competent parties, having similar market knowledge, where the property is exposed to the market for a period of time to allow an understanding of the property being for sale and available to the public, where the parties acting in good faith reach an agreed price and consideration is fully paid.
That's close enough here.....so, if those conditions existed, you bought it at market value. When a broken window is fixed, the cost should raise that beginning value, that should be true since your sale price should have included the cost of that maintenance repair.
When you buy a property, buying right, you need to assess the value, not just the cost but the economic value that must be added to put the property in good condition, a serviceable operating condition. That cost should be taken into account with your offer as a buyer and your agreed sale price. The assessment should be a fair value made in good faith, not added to just to beat up the seller for grins. That gives you a good indication of your acquisition cost to take care of deferred maintenance.
Now, you can estimate cost of other amenities, new stove, cabinets, etc. that add value; this is a cost plus profit analysis, my labor, talent, time and the cost of my lunch at work. You get the idea, when increasing the functionality, durability, life or ability to use the property we are adding economic values, this is where profits should be made.
Notice, I never said your offer had to be the seller's asking price or that acquisition costs were an asking price less actual repair cost, your arrival at your offer needs to consider all of these aspects in two areas, real costs to repair to an open market condition as well as the real and economic costs to improve the property with your profit.
All investors want to buy cheap, I get it, so do I, but I don't low ball a little old lady to see if I can get away with it. I actually look at what I bring to the table, my time, knowledge, experience and value that fairly (but it is probably more than newbie, no offense) gives me my needed return, that is where the offer comes from, justified, honest and up front.
So, most likely you did buy at market value but it may have been at a distressed value due to required deferred maintenance and repairs, but that isn't "under market value". Hopefully, the money spent will bring the value up from its distressed sale price, to a higher, more profitable value. Good Luck!