Skip to content

Commit

Permalink
InputTextMultiline(): multi-line selection draw fix (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jun 17, 2015
1 parent 917a1fd commit f1dfc4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7144,7 +7144,7 @@ static bool InputTextEx(const char* label, char* buf, size_t buf_size, const ImV
for (const ImWchar* p = text_selected_begin; p < text_selected_end; )
{
ImVec2 rect_size = CalcTextSizeW(edit_state.Font, edit_state.FontSize, FLT_MAX, p, text_selected_end, &p, NULL, true);
ImRect rect(render_pos + rect_pos + ImVec2(-edit_state.ScrollX, -font_offy_up), render_pos + rect_pos + ImVec2(rect_size.x - edit_state.ScrollX, +font_offy_dn));
ImRect rect(render_pos + rect_pos + ImVec2(-edit_state.ScrollX, (p == text_selected_begin) ? -font_offy_up : -g.FontSize), render_pos + rect_pos + ImVec2(rect_size.x - edit_state.ScrollX, (p == text_selected_end) ? +font_offy_dn : 0.0f));
rect.Clip(clip_rect);
window->DrawList->AddRectFilled(rect.Min, rect.Max, font_color);
rect_pos.x = 0.0f;
Expand Down

0 comments on commit f1dfc4d

Please sign in to comment.