mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
improve the method naming for "mark new word position", move the mark operation out of bookmarkEditPosition up one level to LFUN_SELF_INSERT of the text inset dispatch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38181 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7b3762cd69
commit
934cadd381
@ -700,7 +700,6 @@ CursorStatus BufferView::cursorStatus(DocIterator const & dit) const
|
||||
|
||||
void BufferView::bookmarkEditPosition()
|
||||
{
|
||||
d->cursor_.markEditPosition();
|
||||
// Don't eat cpu time for each keystroke
|
||||
if (d->cursor_.paragraph().id() == d->bookmark_edit_position_)
|
||||
return;
|
||||
|
@ -518,14 +518,14 @@ void Cursor::setCursorToAnchor()
|
||||
}
|
||||
|
||||
|
||||
void Cursor::markEditPosition()
|
||||
void Cursor::markNewWordPosition()
|
||||
{
|
||||
if (lyxrc.spellcheck_continuously && inTexted() && new_word_.empty()) {
|
||||
FontSpan ow = locateWord(WHOLE_WORD);
|
||||
if (ow.size() == 1) {
|
||||
FontSpan nw = locateWord(WHOLE_WORD);
|
||||
if (nw.size() == 1) {
|
||||
LYXERR(Debug::DEBUG, "start new word: "
|
||||
<< " par: " << pit()
|
||||
<< " pos: " << ow.first);
|
||||
<< " pos: " << nw.first);
|
||||
new_word_ = *this;
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ public:
|
||||
void checkBufferStructure();
|
||||
|
||||
/// hook for text input to maintain the "new born word"
|
||||
void markEditPosition();
|
||||
void markNewWordPosition();
|
||||
|
||||
/// The position of the new born word
|
||||
/// As the user is entering a word without leaving it
|
||||
|
@ -1552,6 +1552,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|
||||
cur.resetAnchor();
|
||||
moveCursor(cur, false);
|
||||
cur.markNewWordPosition();
|
||||
bv->bookmarkEditPosition();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user