@@ -488,9 +488,9 @@ void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwa
488
488
{
489
489
// no previous nick completion is active
490
490
prefix_start = prefix_end = m_cursor;
491
- while (prefix_start > 0 && !isspace (m_line[prefix_start-1 ]))
491
+ while (prefix_start > 0 && !iswspace (m_line[prefix_start-1 ]))
492
492
--prefix_start;
493
- while (prefix_end < m_line.size () && !isspace (m_line[prefix_end]))
493
+ while (prefix_end < m_line.size () && !iswspace (m_line[prefix_end]))
494
494
++prefix_end;
495
495
if (prefix_start == prefix_end)
496
496
return ;
@@ -519,7 +519,7 @@ void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwa
519
519
u32 replacement_index = 0 ;
520
520
if (!initial)
521
521
{
522
- while (word_end < m_line.size () && !isspace (m_line[word_end]))
522
+ while (word_end < m_line.size () && !iswspace (m_line[word_end]))
523
523
++word_end;
524
524
std::wstring word = m_line.substr (prefix_start, word_end - prefix_start);
525
525
@@ -538,7 +538,7 @@ void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwa
538
538
}
539
539
}
540
540
std::wstring replacement = completions[replacement_index];
541
- if (word_end < m_line.size () && isspace ( word_end))
541
+ if (word_end < m_line.size () && iswspace (m_line[ word_end] ))
542
542
++word_end;
543
543
544
544
// replace existing word with replacement word,
@@ -593,17 +593,17 @@ void ChatPrompt::cursorOperation(CursorOp op, CursorOpDir dir, CursorOpScope sco
593
593
case CURSOROP_SCOPE_WORD:
594
594
if (dir == CURSOROP_DIR_RIGHT) {
595
595
// skip one word to the right
596
- while (new_cursor < length && isspace (m_line[new_cursor]))
596
+ while (new_cursor < length && iswspace (m_line[new_cursor]))
597
597
new_cursor++;
598
- while (new_cursor < length && !isspace (m_line[new_cursor]))
598
+ while (new_cursor < length && !iswspace (m_line[new_cursor]))
599
599
new_cursor++;
600
- while (new_cursor < length && isspace (m_line[new_cursor]))
600
+ while (new_cursor < length && iswspace (m_line[new_cursor]))
601
601
new_cursor++;
602
602
} else {
603
603
// skip one word to the left
604
- while (new_cursor >= 1 && isspace (m_line[new_cursor - 1 ]))
604
+ while (new_cursor >= 1 && iswspace (m_line[new_cursor - 1 ]))
605
605
new_cursor--;
606
- while (new_cursor >= 1 && !isspace (m_line[new_cursor - 1 ]))
606
+ while (new_cursor >= 1 && !iswspace (m_line[new_cursor - 1 ]))
607
607
new_cursor--;
608
608
}
609
609
break ;
0 commit comments