In Advanced submenu of Edit menu click Remove trailing whitespaces. If text is selected then trailing whitespaces will be removed from selection. Otherwise then trailing whitespaces will be removed from current line.