Browse Source

InputTextMultiline() filtering out \r for now (#200)

ocornut 10 năm trước cách đây
mục cha
commit
1b28f11acb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -6720,7 +6720,7 @@ static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags f
     if (c < 128 && c != ' ' && !isprint((int)(c & 0xFF)))
     {
         bool pass = false;
-        pass |= ((c == '\n' || c == '\r') && (flags & ImGuiInputTextFlags_Multiline));
+        pass |= (c == '\n' && (flags & ImGuiInputTextFlags_Multiline));
         pass |= (c == '\t' && (flags & ImGuiInputTextFlags_AllowTabInput));
         if (!pass)
             return false;