refactor out Docview:render calling into a seperate function
so that it won't be called when redering is not neccessary.
Merge pull request #221 from chrox/master

refactor out Docview:render calling into a seperate function