diff --git a/include/eepp/ee.hpp b/include/eepp/ee.hpp index f47854256..34d9f3292 100644 --- a/include/eepp/ee.hpp +++ b/include/eepp/ee.hpp @@ -39,7 +39,7 @@ using namespace EE::Graphics; using namespace EE::Network; using namespace EE::Network::SSL; -// Scnee +// Scene #include using namespace EE::Scene; diff --git a/premake4.lua b/premake4.lua index ee8eb3c60..ad722be78 100644 --- a/premake4.lua +++ b/premake4.lua @@ -1040,7 +1040,6 @@ solution "eepp" language "C++" set_targetdir("libs/" .. os.get_real() .. "/thirdparty/") includedirs { "src/thirdparty/efsw/include", "src/thirdparty/efsw/src" } - defines { "EFSW_USE_CXX11" } if not is_vs() then buildoptions{ "-std=c++17" } else diff --git a/premake5.lua b/premake5.lua index d43c6183d..73a77c012 100644 --- a/premake5.lua +++ b/premake5.lua @@ -11,6 +11,7 @@ newoption { trigger = "windows-mingw-build", description = "This is used to buil newoption { trigger = "with-emscripten-pthreads", description = "Enables emscripten build to use posix threads" } newoption { trigger = "with-mold-linker", description = "Tries to use the mold linker instead of the default linker of the toolchain" } newoption { trigger = "with-debug-symbols", description = "Release builds are built with debug symbols." } +newoption { trigger = "thread-sanitizer", description ="Compile with ThreadSanitizer." } newoption { trigger = "with-backend", description = "Select the backend to use for window and input handling.\n\t\t\tIf no backend is selected or if the selected is not installed the script will search for a backend present in the system, and will use it.", @@ -788,7 +789,6 @@ workspace "eepp" kind "StaticLib" language "C++" cppdialect "C++17" - defines { "EFSW_USE_CXX11" } targetdir("libs/" .. os.target() .. "/thirdparty/") incdirs { "src/thirdparty/efsw/include", "src/thirdparty/efsw/src" } files { "src/thirdparty/efsw/src/efsw/*.cpp" } diff --git a/src/thirdparty/efsw b/src/thirdparty/efsw index f3914e475..3b0ffd290 160000 --- a/src/thirdparty/efsw +++ b/src/thirdparty/efsw @@ -1 +1 @@ -Subproject commit f3914e475cc8cec461ac05060470c6510ee81246 +Subproject commit 3b0ffd2908fa8d52a54e228f92c67330dfd015b4 diff --git a/src/tools/ecode/plugins/autocomplete/autocompleteplugin.cpp b/src/tools/ecode/plugins/autocomplete/autocompleteplugin.cpp index dc825e1b1..3e1748a43 100644 --- a/src/tools/ecode/plugins/autocomplete/autocompleteplugin.cpp +++ b/src/tools/ecode/plugins/autocomplete/autocompleteplugin.cpp @@ -197,6 +197,8 @@ bool AutoCompletePlugin::onKeyDown( UICodeEditor* editor, const KeyEvent& event mSignatureHelpSelected % (int)mSignatureHelp.signatures.size(); editor->invalidateDraw(); return true; + } else { + resetSignatureHelp(); } } else if ( event.getKeyCode() == KEY_DOWN ) { if ( mSignatureHelp.signatures.size() > 1 ) { @@ -208,6 +210,8 @@ bool AutoCompletePlugin::onKeyDown( UICodeEditor* editor, const KeyEvent& event mSignatureHelpSelected = mSignatureHelpSelected % mSignatureHelp.signatures.size(); editor->invalidateDraw(); return true; + } else { + resetSignatureHelp(); } } else if ( event.getKeyCode() == EE::Window::KEY_BACKSPACE || event.getKeyCode() == EE::Window::KEY_DELETE ) { @@ -686,7 +690,14 @@ void AutoCompletePlugin::postDraw( UICodeEditor* editor, const Vector2f& startSc Text text( "", editor->getFont(), editor->getFontSize() ); text.setFillColor( mSuggestionIndex == (int)i ? selectedStyle.color : normalStyle.color ); text.setStyle( mSuggestionIndex == (int)i ? selectedStyle.style : normalStyle.style ); - text.setString( suggestions[i].text ); + + auto nlPos = suggestions[i].text.find_first_of( '\n' ); + if ( nlPos == std::string::npos ) { + text.setString( suggestions[i].text ); + } else { + text.setString( suggestions[i].text.substr( 0, nlPos ) ); + } + text.draw( cursorPos.x + iconSpace.getWidth() + mBoxPadding.Left, cursorPos.y + mRowHeight * count + mBoxPadding.Top );