@Hinidu  you could use `xrealloc` to replace `vim_strsave` and `free` in hope that copying is not necessary (memory is only shrinked).