Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv32630/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
don't strip spaces from the right of the text before expanding it (bug 687)
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.303
retrieving revision 1.304
diff -b -u -2 -r1.303 -r1.304
--- wxComposeView.cpp 8 Sep 2002 19:23:09 -0000 1.303
+++ wxComposeView.cpp 8 Sep 2002 20:51:27 -0000 1.304
@@ -1743,6 +1743,12 @@
// try to expand the last component
String& text = *textAddress;
- text.Trim(FALSE); // trim spaces from both sides
+
+ // trim spaces from left, but not (all) from right -- this allows "Dan " to
+ // be expanded into "Dan Black" but not in "Danish Guy"
+ text.Trim(FALSE);
+ bool hasSpaceAtEnd = !text.empty() && text.Last() == ' ';
text.Trim(TRUE);
+ if ( !text.empty() && hasSpaceAtEnd )
+ text += ' ';
// check for the lone '"' simplifies the code for finding the starting
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates