Question: I am using Finder list view in OSX Lion 10.7.3, and I want to size the window to the contents. I click the zoom (green) button which according to the web 'toggles the window between the “user state” and the “standard state”'.

However, I find that OSX miscalculates and makes the window about 2.5 lines too short to fit the whole file list, unless the list is very small in which case it goes no shorter than a minimum size.

How do I avoid this behaviour and size the window to the list correctly?

Answer: 
Unfortunately I think you may be out of luck on this one. I tried hiding the toolbar, path bar, status bar, holding down modifier keys — nothing seems to change this behavior. You could check out some [third-party utilities](http://www.macupdate.com/app/mac/30591/right-zoom) to change the zoom button's behavior, but I don't know of anything that will give you the exact behavior you want.
As far as I'm concerned, it's a bug - this is a feature that has worked the same way in every version of the Mac OS that I've ever used until Lion. I'm stunned that it still hasn't been fixed after three major 10.7 updates. It defies logic that "zoom" would mean anything but "only make the window large enough to show all of the window contents," as it does in Icon view. I'm filing a report right now:
<http://www.apple.com/feedback/macosx.html>

Come on, Apple, fix this.