Properly calculate width of whitespace characters when text is justified
Fix coding style
Merge pull request #1614 from sorich87/hotfix/width-of-char-calculation

Fix text selection and cursor position when text is justified