a better way to make the scrollspy work correctly for a short last block

Signed-off-by: Mohamad Ahmadi <mohamadhasan.ahmadi@gmail.com>
Merge branch 'fix_scrollspy'