mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add completion-accept lfun.
Fixes first part of http://bugzilla.lyx.org/show_bug.cgi?id=5062 . http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg143281.html git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26331 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f6084eaaa9
commit
375a2e6e1c
@ -405,6 +405,7 @@ enum FuncCode
|
||||
LFUN_GRAPHICS_GROUPS_UNIFY,
|
||||
LFUN_SET_GRAPHICS_GROUP,
|
||||
LFUN_COMPLETION_CANCEL,
|
||||
LFUN_COMPLETION_ACCEPT,
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
||||
|
@ -3011,6 +3011,15 @@ void LyXAction::init()
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_COMPLETION_CANCEL, "completion-cancel", SingleParUpdate, Edit },
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_COMPLETION_ACCEPT
|
||||
* \li Action: Accept suggested completion.
|
||||
* \li Syntax: completion-accept
|
||||
* \li Origin: sanda, Sep 08 2008
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_COMPLETION_ACCEPT, "completion-accept", SingleParUpdate, Edit },
|
||||
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_BRANCH_ACTIVATE
|
||||
|
@ -1212,6 +1212,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
enable = false;
|
||||
break;
|
||||
|
||||
case LFUN_COMPLETION_ACCEPT:
|
||||
case LFUN_COMPLETION_CANCEL:
|
||||
if (!d.current_work_area_
|
||||
|| (!d.current_work_area_->completer().popupVisible()
|
||||
@ -2022,6 +2023,12 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_COMPLETION_ACCEPT:
|
||||
if (d.current_work_area_)
|
||||
d.current_work_area_->completer().activate();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
dispatched = false;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user