Double-click selection improvement

Better handling of separators selection.
Fix an issue when a word is ending right at the term right margin.