Fix empty selection highlighting bug.
authornoname <noname@inventati.org>
Sun, 3 May 2015 19:28:10 +0000 (19:28 +0000)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Mon, 4 May 2015 10:06:43 +0000 (12:06 +0200)
When user clicks LMB, one character is selected, but will not be copied
to selection until the user moves cursor a bit. Therefore, the character
should not be highlighted as selected yet.

Before the patch, the trick was not to mark line as dirty to avoid
highlighting it. However, if user has already selected something and
clicks in line that contains selection, selclear sets the line as dirty
and one character is highlighted when it should not.

This patch replaces dirty trick with explicit check for sel.mode inside
selected().


No differences found