summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-03 01:18:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-03 01:18:04 +0300
commitff01386ce73890e96ec5418b409e51b433f3bb6c (patch)
tree1136f304d664b4e2feedad0326d11fc66e9b3905 /src/gui
parentc20081427661a5c501e953ebf495f4c99b60ca43 (diff)
downloadplus-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')
-rw-r--r--src/gui/widgets/chattab.cpp20
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);