mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Add an LFUN for continuous spell checking
This fixes the first part of #8589.
This commit is contained in:
parent
a31df78133
commit
cb93f034d4
@ -456,6 +456,7 @@ enum FuncCode
|
||||
LFUN_VC_RENAME, // gb 20130205
|
||||
LFUN_VC_COPY, // gb 20130205
|
||||
// 355
|
||||
LFUN_SPELLING_CONTINUOUSLY, // vfr, 20130324
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
||||
|
@ -1045,6 +1045,16 @@ void LyXAction::init()
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_SPELLING_REMOVE, "spelling-remove", ReadOnly, Edit },
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_SPELLING_CONTINUOUSLY
|
||||
* \li Action: Toggle continuous spell checking.
|
||||
* \li Syntax: spelling-continuously
|
||||
* \li Origin: vfr, 24 March 2013
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_SPELLING_CONTINUOUSLY, "spelling-continuously", ReadOnly, Edit },
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_THESAURUS_ENTRY
|
||||
* \li Action: Look up thesaurus entries with respect to the word under the cursor.
|
||||
|
@ -1855,6 +1855,10 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
enable = documentBufferView() && documentBufferView()->cursor().inTexted();
|
||||
break;
|
||||
|
||||
case LFUN_SPELLING_CONTINUOUSLY:
|
||||
flag.setOnOff(lyxrc.spellcheck_continuously);
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@ -3758,6 +3762,12 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
one.startscript(Systemcall::DontWait, command);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_SPELLING_CONTINUOUSLY:
|
||||
lyxrc.spellcheck_continuously = !lyxrc.spellcheck_continuously;
|
||||
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||
break;
|
||||
|
||||
default:
|
||||
// The LFUN must be for one of BufferView, Buffer or Cursor;
|
||||
// let's try that:
|
||||
|
Loading…
Reference in New Issue
Block a user