Comment a minor bug not worth fixing (#8986)

This commit is contained in:
Scott Kostyshak 2014-02-19 16:18:28 -05:00
parent 8f1cbe000e
commit f52eb9d823

View File

@ -232,7 +232,9 @@ pair<bool, int> replaceOne(BufferView * bv, docstring searchstr,
if (!cur.inTexted()) if (!cur.inTexted())
// bail in math // bail in math
return make_pair(false, 0); return make_pair(false, 0);
// select current word and treat it as the search string // select current word and treat it as the search string.
// This causes a minor bug as undo will restore this selection,
// which the user did not create (#8986).
cur.innerText()->selectWord(cur, WHOLE_WORD); cur.innerText()->selectWord(cur, WHOLE_WORD);
searchstr = cur.selectionAsString(false); searchstr = cur.selectionAsString(false);
} }