Hi, I would argue that:
- if (insert->length > 0) - { - // remove trailing ESC - --insert->length; - if (s[insert->length] == ESC) - s[insert->length] = NUL; - } + if (insert.length > 0 && s[insert.length - 1] == ESC) // remove trailing ESC + s[insert.length - 1] = NUL; return s; still does not fix the length if there is a trailing ESC. Perhaps: - s[insert.length - 1] = NUL; + s[--insert.length] = NUL; would do the job? Christ van Willegen -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/CA%2BOt1OxmbjrYYCVVRVvoYzg9TLrAa%3Dp4FqLO3O0oQtyBphijBA%40mail.gmail.com.