mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
ImGui: always rebuild summary text on input text change
This fixes corner case bugs like selecting currently entered text, and deleting it at once. If we happen to show a ConVar's value, and do the mentioned action, it wouldn't clear it as "if (iData->BufTextLen)" won't satisfy.
This commit is contained in:
parent
6d3bd818e1
commit
5de3738d0c
@ -1037,9 +1037,8 @@ int CConsole::TextEditCallback(ImGuiInputTextCallbackData* iData)
|
||||
iData->DeleteChars(0, 1);
|
||||
}
|
||||
|
||||
if (iData->BufTextLen) // Attempt to build a summary..
|
||||
if (iData->BufTextLen)
|
||||
{
|
||||
BuildSummaryText(iData->Buf);
|
||||
m_canAutoComplete = true;
|
||||
}
|
||||
else // Reset state and enable history scrolling when buffer is empty.
|
||||
@ -1047,6 +1046,7 @@ int CConsole::TextEditCallback(ImGuiInputTextCallbackData* iData)
|
||||
ResetAutoCompleteData();
|
||||
}
|
||||
|
||||
BuildSummaryText(iData->Buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user