neovim/runtime/autoload
zeertzjq 62dc1f2663
vim-patch:8750e3cf81f1 (#26163)
runtime(netrw): Fix handling of very long filename on longlist style (vim/vim#12150)

If there is a file with a very long filename (longer than
g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space
is inserted between the filename and the filesize and the file cannot be
opened because of this.

E.g.:
```
$ echo hello > 12345678901234567890123456789012	  # 32 bytes: OK
$ echo hello > 123456789012345678901234567890123  # 33 bytes: not OK
$ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK
$ echo hello > こんにちは                         # multibyte filename
$ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1"
```

Then, it will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                              0 Mon Mar 13 19:25:16 2023
./                               0 Mon Mar 13 19:44:58 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023
こんにちは                  6 Mon Mar 13 19:30:41 2023
```

If the length of the filename is 32 bytes, there is a space between the
filename and the filesize. However, when it is longer than 32 bytes, no
space is shown.

Also, you may find that the filesize of the multibyte named file is not
aligned.

After this patch is applied, the filelist will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                                             0 Mon Mar 13 20:49:22 2023
./                                              0 Mon Mar 13 21:12:14 2023
1234567890123456789012345678901             10000 Mon Mar 13 20:57:55 2023
12345678901234567890123456789012                6 Mon Mar 13 19:29:43 2023
123456789012345678901234567890123               6 Mon Mar 13 19:29:49 2023
1234567890123456789012345678901234              6 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901234567       10000 Mon Mar 13 21:03:23 2023
1234567890123456789012345678901234567890    10000 Mon Mar 13 21:03:36 2023
123456789012345678901234567890123456789012  10000 Mon Mar 13 21:03:59 2023
1234567890123456789012345678901234567890123  10000 Mon Mar 13 21:03:45 2023
1234567890123456789012345678901234567890123456  5 Mon Mar 13 21:08:15 2023
12345678901234567890123456789012345678901234567  10 Mon Mar 13 21:05:21 2023
こんにちは                                      6 Mon Mar 13 19:30:41 2023
```

Now we have 32 + 2 + 15 = 49 characters for filename and filesize.
It tries to align the filesize as much as possible.
The last line that has multibyte filename is also aligned.

Also fixed the issue that the file list is not shown correctly when
g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or
'H'.

8750e3cf81

Co-authored-by: K.Takata <kentkt@csc.jp>
2023-11-23 17:02:53 +08:00
..
cargo vim-patch:fc93594d562d 2023-09-13 17:23:45 +02:00
dist vim-patch:b2a4c110a5d1 2023-11-05 21:52:02 +01:00
provider fix(clipboard): don't pass --foreground to wl-copy (#25481) 2023-10-03 11:24:33 +08:00
remote
rust vim-patch:fc93594d562d 2023-09-13 17:23:45 +02:00
xml
zig vim-patch:86b4816766d9 (#21314) 2022-12-08 16:33:38 +01:00
ada.vim
adacomplete.vim
bitbake.vim vim-patch:b529cfbd04c0 (#19501) 2022-07-26 11:26:23 +02:00
cargo.vim vim-patch:fc93594d562d 2023-09-13 17:23:45 +02:00
ccomplete.lua vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
ccomplete.vim dist: generated version of ccomplete.vim (#21623) 2023-01-05 11:00:32 -05:00
clojurecomplete.vim vim-patch:46eea444d (#17920) 2022-03-30 12:12:12 +01:00
context.vim
contextcomplete.vim
csscomplete.vim
decada.vim
freebasic.vim vim-patch:0d878b95d8f9 (#19197) 2022-07-02 11:06:03 +02:00
gnat.vim
gzip.vim vim-patch:cd8a3eaf5348 2023-11-05 21:52:02 +01:00
haskellcomplete.vim
health.vim fix(checkhealth): fix crash due to incorrect argument type 2023-04-16 12:26:13 +02:00
htmlcomplete.vim
javascriptcomplete.vim vim-patch:a0fddaa2f4b7 2023-08-21 20:32:28 +09:00
msgpack.vim fix(messages): use "Vimscript" instead of "VimL" #24111 2023-06-22 04:09:14 -07:00
netrw_gitignore.vim
netrw.vim vim-patch:8750e3cf81f1 (#26163) 2023-11-23 17:02:53 +08:00
netrwFileHandlers.vim
netrwSettings.vim vim-patch:b7398fe41c9e (#23627) 2023-05-15 09:38:32 +02:00
paste.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
phpcomplete.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
provider.vim
python3complete.vim vim-patch:46eea444d (#17920) 2022-03-30 12:12:12 +01:00
python.vim vim-patch:partial:dd60c365cd26 (#22437) 2023-02-28 09:34:27 +01:00
pythoncomplete.vim
README.txt
RstFold.vim
rubycomplete.vim
rust.vim vim-patch:fc93594d562d 2023-09-13 17:23:45 +02:00
rustfmt.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
shada.vim fix(messages): use "Vimscript" instead of "VimL" #24111 2023-06-22 04:09:14 -07:00
spellfile.vim
sqlcomplete.vim
syntaxcomplete.vim
tar.vim vim-patch:67abf1592c83 2023-11-14 23:29:09 +01:00
tohtml.vim vim-patch:86cfb39030eb 2023-09-09 08:29:50 +02:00
tutor.vim refactor(tutor): cleanup 2023-09-26 06:41:53 -07:00
vimexpect.vim
xmlcomplete.vim
xmlformat.vim
zip.vim vim-patch:cd8a3eaf5348 2023-11-05 21:52:02 +01:00

The autoload directory is for standard Vim autoload scripts.

These are functions used by plugins and for general use.  They will be loaded
automatically when the function is invoked.  See ":help autoload".

gzip.vim	for editing compressed files
netrw*.vim	browsing (remote) directories and editing remote files
tar.vim		browsing tar files
zip.vim		browsing zip files
paste.vim	common code for mswin.vim, menu.vim and macmap.vim
spellfile.vim	downloading of a missing spell file

Omni completion files:
ccomplete.vim		C
csscomplete.vim		HTML / CSS
htmlcomplete.vim	HTML
javascriptcomplete.vim  Javascript
phpcomplete.vim		PHP
pythoncomplete.vim	Python
rubycomplete.vim	Ruby
syntaxcomplete.vim	from syntax highlighting
xmlcomplete.vim		XML (uses files in the xml directory)