]> git.lyx.org Git - features.git/commit
Make CursorData::checkNewWordPosition() more robust
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 31 Jan 2018 15:26:45 +0000 (16:26 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 31 Jan 2018 15:26:45 +0000 (16:26 +0100)
commit2e633645edf00ed44eed35923c6045ef7038a610
treeece80184c783eaaae263b6f71f31bd9da044c634
parented3f6801bd585d6a764500eaaa5b66da0d943931
Make CursorData::checkNewWordPosition() more robust

Before accessing things like new_word_.lastpos(), it is better to make
sure that new_word_ points to something that exists. Therefore, the
call to fixIfBroken() is moved in first position.

Other changes: inTexted() is replaced by a more general test that
current inset has not changed; test idx() in addition to pit().
src/Cursor.cpp