Project

Profile

Help

Revision 4102863f

ID4102863fc0e3310464f42e1910aeaebd767468da
Parent 060e5a35
Child 96664dff

Added by Vincent Le Goff almost 3 years ago

Fix #98: systematic error on command stacking

View differences:

src/client.py
1 1
# Copyright (c) 2016, LE GOFF Vincent
2
# Copyright (c) 2016, LE GOFF Vincent
2 3
# All rights reserved.
3 4

  
4 5
# Redistribution and use in source and binary forms, with or without
......
215 216
        encoding = settings["options.general.encoding"]
216 217
        if stacking:
217 218
            delimiter = re.escape(stacking)
218
            re_del = re.compile("(?<!{s}){s}(?!{s})".format(s=delimiter), re.UNICODE)
219
            re_stacking = "(?<!{s}){s}(?!{s})".format(s=delimiter)
220
            re_del = re.compile(re_stacking, re.UNICODE)
219 221
            chunks = re_del.split(text)
220 222

  
221 223
            # Reset ;; as ; (or other command stacking character)
......
239 241
                        if alias.test(text):
240 242
                            return
241 243

  
242
            if not text.endswith("\r\n"):
243
                text += "\r\n"
244
                if not text.endswith("\r\n"):
245
                    text += "\r\n"
244 246

  
245
            self.transport.write(text)
247
                self.transport.write(text)
246 248

  
247 249
    def test_macros(self, key, modifiers):
248 250
        """Test the macros of this world."""

Also available in: Unified diff