mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
Rename and refactor mch_FullName.
* Rename mch_FullName to mch_full_name to match the style guide. * Add mch_full_dir_name, which saves the absolute path of a given directory relative to cwd into a given buffer. * Add function append_path, which glues together two given paths with a slash. * Adapt moonscript coding style to the tests.
This commit is contained in:

committed by
Thiago de Arruda

parent
7e8c8cf5a1
commit
92a0374d7b
@@ -5065,7 +5065,7 @@ int path_with_url(char_u *fname)
|
||||
*/
|
||||
int vim_isAbsName(char_u *name)
|
||||
{
|
||||
return path_with_url(name) != 0 || mch_isFullName(name);
|
||||
return path_with_url(name) != 0 || mch_is_full_name(name);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -5090,7 +5090,7 @@ vim_FullName (
|
||||
|
||||
url = path_with_url(fname);
|
||||
if (!url)
|
||||
retval = mch_FullName(fname, buf, len, force);
|
||||
retval = mch_full_name(fname, buf, len, force);
|
||||
if (url || retval == FAIL) {
|
||||
/* something failed; use the file name (truncate when too long) */
|
||||
vim_strncpy(buf, fname, len - 1);
|
||||
|
Reference in New Issue
Block a user