7cccaec5dd
Pinneado al commit 0a88824f del upstream. Patches locales aplicados a TextEditor.cpp para compilar contra ImGui 1.91+ (GetKeyIndex eliminado, PushAllowKeyboardFocus/PopAllowKeyboardFocus removidos). Documentado en cpp/vendor/imgui_text_edit/README.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
ImGuiColorTextEdit (vendored)
Source: https://github.com/BalazsJako/ImGuiColorTextEdit
License: MIT
Pinned commit: 0a88824f7de8d0bd11d8419066caa7d3469395c4 (master HEAD at vendor time)
Files:
TextEditor.hTextEditor.cpp
Used by cpp/functions/core/text_editor.{h,cpp} via PIMPL — the public API is in
namespace fn:: and the vendor's TextEditor type is hidden inside the .cpp.
Updating
cd cpp/vendor/imgui_text_edit
curl -fL -O https://raw.githubusercontent.com/BalazsJako/ImGuiColorTextEdit/<commit>/TextEditor.h
curl -fL -O https://raw.githubusercontent.com/BalazsJako/ImGuiColorTextEdit/<commit>/TextEditor.cpp
# Update commit hash above.
Notes / known issues
- The vendor expects
imgui.handimgui_internal.hin the include path. Both are provided by our vendored ImGui incpp/vendor/imgui/. LanguageDefinition::GLSL(),SQL(),CPlusPlus()are provided by the vendor and consumed by our wrapper (fn::CodeLang).inotifywatcher limit on Linux — seefile_watcher_cpp_core.md.
Local patches applied
Upstream commit 0a88824f predates several ImGui API removals (we vendor ImGui
1.91+). The following minimal in-tree patches were applied to TextEditor.cpp:
ImGui::GetKeyIndex(ImGuiKey_X)->ImGuiKey_X(theImGuiKeyenum is now a direct, stable index —GetKeyIndexwas removed).ImGui::PushAllowKeyboardFocus(true)/PopAllowKeyboardFocus()-> removed (replaced upstream bySetItemKeyOwner/ImGuiItemFlags_AllowKeyboardFocus, but the editor functions correctly without them in our embedding).
Re-apply when refreshing the vendor:
sed -i 's/ImGui::GetKeyIndex(\([^)]*\))/\1/g' TextEditor.cpp
sed -i 's/ImGui::PushAllowKeyboardFocus(true);/\/\/ removed in ImGui 1.89+/g' TextEditor.cpp
sed -i 's/ImGui::PopAllowKeyboardFocus();/\/\/ removed in ImGui 1.89+/g' TextEditor.cpp