Browse Source

Fixed markdown widget.

Бранимир Караџић 7 years ago
parent
commit
419c49d4f9
1 changed files with 4 additions and 0 deletions
  1. 4 0
      3rdparty/dear-imgui/widgets/markdown.inl

+ 4 - 0
3rdparty/dear-imgui/widgets/markdown.inl

@@ -164,6 +164,10 @@ namespace ImGui
                 text = endPrevLine;
                 text = endPrevLine;
                 if( *text == ' ' ) { ++text; }    // skip a space at start of line
                 if( *text == ' ' ) { ++text; }    // skip a space at start of line
                 endPrevLine = pFont->CalcWordWrapPositionA( scale, text, text_end, widthLeft );
                 endPrevLine = pFont->CalcWordWrapPositionA( scale, text, text_end, widthLeft );
+                if (text == endPrevLine)
+                {
+                    endPrevLine++;
+                }
                 ImGui::TextUnformatted( text, endPrevLine );
                 ImGui::TextUnformatted( text, endPrevLine );
             }
             }
         }
         }