diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-23 17:13:47 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-02-23 17:19:55 +0800 |
commit | 365b865d6b92f3035e95ddbc1a7d111413cbe141 (patch) | |
tree | 1e5f3880cca4f9663c5f36f0ea21ba3738621089 | |
parent | 0861ea6949a0c7281c56083092d389cae5d7bde8 (diff) | |
download | rneovim-365b865d6b92f3035e95ddbc1a7d111413cbe141.tar.gz rneovim-365b865d6b92f3035e95ddbc1a7d111413cbe141.tar.bz2 rneovim-365b865d6b92f3035e95ddbc1a7d111413cbe141.zip |
vim-patch:9.1.1141: Misplaced comment in readfile()
Problem: Misplaced comment in readfile().
(after v9.1.1139)
Solution: Move the comment above S_ISDIR().
(zeertzjq)
closes: vim/vim#16714
https://github.com/vim/vim/commit/b8989fb860808bbcb0e90b2ba597f66a092277d8
-rw-r--r-- | src/nvim/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 7c41c84838..b79ecf22d7 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -355,8 +355,6 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip, if (!read_stdin && fname != NULL) { perm = os_getperm(fname); - // On Unix it is possible to read a directory, so we have to - // check for it before os_open(). } #ifdef OPEN_CHR_FILES @@ -372,6 +370,8 @@ int readfile(char *fname, char *sfname, linenr_T from, linenr_T lines_to_skip, && !(IS_CHR_DEV(perm, fname)) // ... or a character special file named /dev/fd/<n> ) { + // On Unix it is possible to read a directory, so we have to + // check for it before os_open(). if (S_ISDIR(perm)) { if (!silent) { filemess(curbuf, fname, _(msg_is_a_directory)); |