mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Follow-up to 4ba4a2f33c
This commit is contained in:
parent
e7b89e61e8
commit
850869bb0f
|
@ -552,8 +552,8 @@ void Notebook::performLayout(bool animated)
|
||||||
{
|
{
|
||||||
auto largestWidth = 0;
|
auto largestWidth = 0;
|
||||||
int colStart = col * verticalRowSpace;
|
int colStart = col * verticalRowSpace;
|
||||||
int colEnd =
|
int colEnd = std::min((col + 1) * verticalRowSpace,
|
||||||
std::min((col + 1) * verticalRowSpace, this->items_.size());
|
static_cast<int>(this->items_.size()));
|
||||||
|
|
||||||
for (int i = colStart; i < colEnd; i++)
|
for (int i = colStart; i < colEnd; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -486,7 +486,8 @@ void SplitInput::updateCompletionPopup()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = clamp(position, 0, text.length() - 1); i >= 0; i--)
|
for (int i = clamp(position, 0, static_cast<int>(text.length() - 1));
|
||||||
|
i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (text[i] == ' ')
|
if (text[i] == ' ')
|
||||||
{
|
{
|
||||||
|
@ -560,7 +561,8 @@ void SplitInput::insertCompletionText(const QString &input_)
|
||||||
auto text = edit.toPlainText();
|
auto text = edit.toPlainText();
|
||||||
auto position = edit.textCursor().position();
|
auto position = edit.textCursor().position();
|
||||||
|
|
||||||
for (int i = clamp(position, 0, text.length() - 1); i >= 0; i--)
|
for (int i = clamp(position, 0, static_cast<int>(text.length() - 1));
|
||||||
|
i >= 0; i--)
|
||||||
{
|
{
|
||||||
bool done = false;
|
bool done = false;
|
||||||
if (text[i] == ':')
|
if (text[i] == ':')
|
||||||
|
|
Loading…
Reference in a new issue