Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using named filters with InputTextMultiline #4410

Closed
wants to merge 1 commit into from

Commits on Aug 15, 2021

  1. Fix filter-flags disabling newline in multiline inputs

    Implements ocornut#4409: `ImGui::InputTextMultiLine` stops being multi-line when the flags also
    specify one of the named character filters.
    
    ```cpp
        char b1[256] = "1A2B\n3C4D\n", b2[256] = "1A2B\n3C4D";
        ImGui::InputTextMultiline("##t1", b1, 255, ImVec2(0,0), ImGuiInputTextFlags_None);
        ImGui::InputTextMultiline("##t2", b2, 255, ImVec2(0,0), ImGuiInputTextFlags_CharsHexadecimal);
    ```
    
    In the above example, it is not possible to add a new newline to the
    input box, because that input gets filtered out.
    
    This fix short-circuits the existing checks on newline and tab so that
    are not subsequently nixed by a named filter.
    kfsone committed Aug 15, 2021
    Configuration menu
    Copy the full SHA
    912ecd3 View commit details
    Browse the repository at this point in the history