Changelog: 1.1 -- Tweaked reloading behavior. Item slots will now automatically refill from the nearest slot above it, so the bottom-most row of your inventory gets priority for refilling your item bar. This seems more intuitive if you need to refill in a particular order.
Right-click and the game will check to see if you have any empty item slots; if you do have an empty item slot, it will check the inventory slots "above" that item slot to see if there are any items it can move down to your item bar. If it finds them, it moves them.
So basically, if you run out of blocks while building, right-click with your hand and blammo! More blocks from your inventory.