mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(build): remove USE_FNAME_CASE, redundant with CASE_INSENSITIVE_FILENAME
It stands to reason, you need to "fix" case-insensitive filenames if-and-only-if you have case-insensitive filenames.
This commit is contained in:
@ -111,10 +111,8 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR APPLE)
|
||||||
# Ignore case when comparing filenames on Windows and Mac.
|
# Handle case-insensitive filenames for Windows and Mac.
|
||||||
set(CASE_INSENSITIVE_FILENAME TRUE)
|
set(CASE_INSENSITIVE_FILENAME TRUE)
|
||||||
# Enable fixing case-insensitive filenames for Windows and Mac.
|
|
||||||
set(USE_FNAME_CASE TRUE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
#cmakedefine HAVE_WORKING_LIBINTL
|
#cmakedefine HAVE_WORKING_LIBINTL
|
||||||
#cmakedefine UNIX
|
#cmakedefine UNIX
|
||||||
#cmakedefine CASE_INSENSITIVE_FILENAME
|
#cmakedefine CASE_INSENSITIVE_FILENAME
|
||||||
#cmakedefine USE_FNAME_CASE
|
|
||||||
#cmakedefine HAVE_SYS_UIO_H
|
#cmakedefine HAVE_SYS_UIO_H
|
||||||
#ifdef HAVE_SYS_UIO_H
|
#ifdef HAVE_SYS_UIO_H
|
||||||
#cmakedefine HAVE_READV
|
#cmakedefine HAVE_READV
|
||||||
|
@ -2985,7 +2985,7 @@ int setfname(buf_T *buf, char *ffname_arg, char *sfname_arg, bool message)
|
|||||||
close_buffer(NULL, obuf, DOBUF_WIPE, false, false);
|
close_buffer(NULL, obuf, DOBUF_WIPE, false, false);
|
||||||
}
|
}
|
||||||
sfname = xstrdup(sfname);
|
sfname = xstrdup(sfname);
|
||||||
#ifdef USE_FNAME_CASE
|
#ifdef CASE_INSENSITIVE_FILENAME
|
||||||
path_fix_case(sfname); // set correct case for short file name
|
path_fix_case(sfname); // set correct case for short file name
|
||||||
#endif
|
#endif
|
||||||
if (buf->b_sfname != buf->b_ffname) {
|
if (buf->b_sfname != buf->b_ffname) {
|
||||||
|
@ -2134,7 +2134,7 @@ int do_ecmd(int fnum, char *ffname, char *sfname, exarg_T *eap, linenr_T newlnum
|
|||||||
if (sfname == NULL) {
|
if (sfname == NULL) {
|
||||||
sfname = ffname;
|
sfname = ffname;
|
||||||
}
|
}
|
||||||
#ifdef USE_FNAME_CASE
|
#ifdef CASE_INSENSITIVE_FILENAME
|
||||||
if (sfname != NULL) {
|
if (sfname != NULL) {
|
||||||
path_fix_case(sfname); // set correct case for sfname
|
path_fix_case(sfname); // set correct case for sfname
|
||||||
}
|
}
|
||||||
|
@ -1448,7 +1448,7 @@ scripterror:
|
|||||||
p = r;
|
p = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_FNAME_CASE
|
#ifdef CASE_INSENSITIVE_FILENAME
|
||||||
// Make the case of the file name match the actual file.
|
// Make the case of the file name match the actual file.
|
||||||
path_fix_case(p);
|
path_fix_case(p);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1827,7 +1827,7 @@ char *fix_fname(const char *fname)
|
|||||||
|
|
||||||
fname = xstrdup(fname);
|
fname = xstrdup(fname);
|
||||||
|
|
||||||
# ifdef USE_FNAME_CASE
|
# ifdef CASE_INSENSITIVE_FILENAME
|
||||||
path_fix_case((char *)fname); // set correct case for file name
|
path_fix_case((char *)fname); // set correct case for file name
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
@ -2035,7 +2035,7 @@ func Test_edit_browse()
|
|||||||
au!
|
au!
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" When the USE_FNAME_CASE is defined this used to cause a crash.
|
" When the CASE_INSENSITIVE_FILENAME is defined this used to cause a crash.
|
||||||
browse enew
|
browse enew
|
||||||
bwipe!
|
bwipe!
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user