diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-03 01:18:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-03 01:18:04 +0300 |
commit | ff01386ce73890e96ec5418b409e51b433f3bb6c (patch) | |
tree | 1136f304d664b4e2feedad0326d11fc66e9b3905 /src/gui/widgets | |
parent | c20081427661a5c501e953ebf495f4c99b60ca43 (diff) | |
download | plus-ff01386ce73890e96ec5418b409e51b433f3bb6c.tar.gz plus-ff01386ce73890e96ec5418b409e51b433f3bb6c.tar.bz2 plus-ff01386ce73890e96ec5418b409e51b433f3bb6c.tar.xz plus-ff01386ce73890e96ec5418b409e51b433f3bb6c.zip |
Fix http links splitting in chat.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/chattab.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 31ae6a84b..9d936755c 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -460,17 +460,19 @@ int ChatTab::getType() const void ChatTab::addRow(std::string &line) { size_t idx = 0; - - for (size_t f = 0; f < line.length(); f++) + if (line.find("[@@http") == std::string::npos) { - if (line.at(f) == ' ') - { - idx = f; - } - else if (f - idx > MAX_WORD_SIZE) + for (size_t f = 0; f < line.length(); f++) { - line.insert(f, " "); - idx = f; + if (line.at(f) == ' ') + { + idx = f; + } + else if (f - idx > MAX_WORD_SIZE) + { + line.insert(f, " "); + idx = f; + } } } mTextOutput->addRow(line); |