mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-30 21:05:54 -05:00
InputTextMultiline: InputTextMultiline: fixed an issue calculating lines count when active.
Amend 4252275
This commit is contained in:
@@ -84,7 +84,8 @@ Other Changes:
|
||||
- Fixed selection highlight Y1 offset being very slightly off (since 1.92.3). (#9311) [@v-ein]
|
||||
- InputTextMultiline: fixed an issue introduced in 1.92.3 where line count calculated
|
||||
for vertical scrollbar range would be +1 when the widget is inactive, word-wrap is
|
||||
disabled and the text buffer ends with '\n'.
|
||||
disabled and the text buffer ends with '\n'. Fixed a similar issue related to clipping
|
||||
large amount of text.
|
||||
- Style:
|
||||
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||
- When using large values with ScallAllSizes(), the following items thickness
|
||||
|
||||
@@ -5565,7 +5565,7 @@ void ImGui::NewFrame()
|
||||
// As a result, custom widget using ButtonBehavior() _without_ ItemAdd() need to call KeepAliveID() themselves.
|
||||
if (g.ActiveId != 0 && g.ActiveIdIsAlive != g.ActiveId && g.ActiveIdPreviousFrame == g.ActiveId)
|
||||
{
|
||||
IMGUI_DEBUG_LOG_ACTIVEID("NewFrame(): ClearActiveID() because it isn't marked alive anymore!\n");
|
||||
IMGUI_DEBUG_LOG_ACTIVEID("NewFrame(): ClearActiveID() 0x%08X because it isn't marked alive anymore!\n", g.ActiveId);
|
||||
ClearActiveID();
|
||||
}
|
||||
|
||||
|
||||
@@ -4629,11 +4629,8 @@ static int InputTextLineIndexBuild(ImGuiInputTextFlags flags, ImGuiTextIndex* li
|
||||
line_index->Offsets.push_back(0);
|
||||
size++;
|
||||
}
|
||||
if (buf_end > buf && buf_end[-1] == '\n' && size <= max_output_buffer_size && !trailing_line_already_counted)
|
||||
{
|
||||
if (buf_end > buf && buf_end[-1] == '\n' && !trailing_line_already_counted && size++ <= max_output_buffer_size)
|
||||
line_index->Offsets.push_back((int)(buf_end - buf));
|
||||
size++;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user