From 8d451ecb6d91124b2f6de24f57fc508884ab5bfa Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 12 Oct 2001 01:28:38 +0000 Subject: Patch from John to allow double-clicking in autocompletion lists on GTK+. --- src/ScintillaBase.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 75a8ffffa..f938a1f4d 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -173,6 +173,11 @@ int ScintillaBase::KeyCommand(unsigned int iMessage) { return Editor::KeyCommand(iMessage); } +void ScintillaBase::AutoCompleteDoubleClick(void* p) { + ScintillaBase* sci = reinterpret_cast(p); + sci->AutoCompleteCompleted(); +} + void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { //Platform::DebugPrintf("AutoComplete %s\n", list); ct.CallTipCancel(); @@ -222,6 +227,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { ac.lb.SetPositionRelative(rcac, wMain); ac.lb.SetFont(vs.styles[STYLE_DEFAULT].font); ac.lb.SetAverageCharWidth(vs.styles[STYLE_DEFAULT].aveCharWidth); + ac.lb.SetDoubleClickAction(AutoCompleteDoubleClick, this); ac.SetList(list); -- cgit v1.2.3