mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-27 23:37:03 -05:00
InputTextMultiline: InputTextMultiline: fixed an issue calculating lines count when active.
Amend 4252275
This commit is contained in:
@@ -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