Doesn't `write_viminfo` call `buf_modname` with both shortname == true and false? I guess I'll let you do what you suggest in a separate PR.