git-gui: fix applying line/ranges when the selection ends at the begin of a line