avoid empty selections (patch from Vincent van Ravesteijn)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26146 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-08-13 15:22:41 +00:00
parent 3589a75a11
commit 1bad3e5232

View File

@ -1249,10 +1249,11 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
// otherwise, single click does not clear persistent selection
// buffer.
if (cur.selection()) {
// Finish selection.
// If double click, cur is moved to the end of word by selectWord
// but bvcur is current mouse position.
cur.bv().cursor().selection() = true;
// Finish selection. If double click,
// cur is moved to the end of word by
// selectWord but bvcur is current
// mouse position.
cur.bv().cursor().setSelection();
}
// FIXME: We could try to handle drag and drop of selection here.
cur.noUpdate();