# HG changeset patch # User Tim Ringenbach # Date 1088544847 0 # Node ID 796f510a6e1911734f8f543e4cc2c93a322efdad # Parent 66b3f54527e6199c0ebf74ad53dd90356282a00e [gaim-migrate @ 10247] Arun A Tharuvai writes: Slash commands with "w" (and "W") ignore space between it and the next command. This causes the trailing space to either: get treated as the first character of of an immediately following "s" (or "S") argument, or get treated as the entire contents of any following "w" (or "W") arguments. This patch of his, #982083, fixes those issues. committer: Tailor Script diff -r 66b3f54527e6 -r 796f510a6e19 src/cmds.c --- a/src/cmds.c Tue Jun 29 20:35:30 2004 +0000 +++ b/src/cmds.c Tue Jun 29 21:34:07 2004 +0000 @@ -120,15 +120,25 @@ switch (cmd->args[i]) { case 'w': - if (!(end = strchr(cur, ' '))) end = cur + strlen(cur); - (*args)[i] = g_strndup(cur, end - cur); - cur += end - cur; + if (!(end = strchr(cur, ' '))) { + end = cur + strlen(cur); + (*args)[i] = g_strndup(cur, end - cur); + cur = end; + } else { + (*args)[i] = g_strndup(cur, end - cur); + cur = end + 1; + } break; case 'W': - if (!(end = strchr(cur, ' '))) end = cur + strlen(cur); - (*args)[i] = gaim_markup_slice(m, g_utf8_pointer_to_offset(s, cur), g_utf8_pointer_to_offset(s, end)); - cur += end - cur; - break; + if (!(end = strchr(cur, ' '))) { + end = cur + strlen(cur); + (*args)[i] = gaim_markup_slice(m, g_utf8_pointer_to_offset(s, cur), g_utf8_pointer_to_offset(s, end)); + cur = end; + } else { + (*args)[i] = gaim_markup_slice(m, g_utf8_pointer_to_offset(s, cur), g_utf8_pointer_to_offset(s, end)); + cur = end +1; + } + break; case 's': (*args)[i] = g_strdup(cur); cur = cur + strlen(cur);