Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting order for filename completions, for :find, is broken #12725

Open
alexaandru opened this issue Aug 7, 2020 · 3 comments
Open

Sorting order for filename completions, for :find, is broken #12725

alexaandru opened this issue Aug 7, 2020 · 3 comments
Labels
bug-vim wrong behavior inherited from vim

Comments

@alexaandru
Copy link

Sorting order of filename completions for :find is mangled, by having a subset of them be prefixed with ./ and thus, appearing at the top.

  • nvim --version:
NVIM v0.5.0-622-gf26df8bb6
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-b60d7f7a-2dc5-4a6d-bb2a-adaae1420daa

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "
/home/travis/build/neovim/bot-ci/build/neovim/build/nvim.AppDir/usr/share/nvim
"
  • vim -u DEFAULTS (version: ) behaves differently?
    No, I can reproduce the issue with both -u DEFAULTS and -u NONE.

  • Operating system/version:
    Ubuntu 20.04.1 LTS

  • Terminal name/version:
    kitty 0.15.0

  • $TERM:
    xterm-kitty

Steps to reproduce using nvim -u NORC

$ git clone https://github.com/neovim/neovim.git
$ cd neovim
$ nvim -u NONE
:find <tab>
:set path=**
:find <tab>

the above is just an example, I can reproduce the issue with any number of repos.
There doesn't seem to be any pattern for which files are picked to be prefixed with ./... (at least I haven't found any).

Actual behaviour

Some of the completions are prefixed with ./ and thus appear at the top of the list.

Screenshot from 2020-08-07 12-08-06
Screenshot from 2020-08-07 12-08-15

Expected behaviour

That no completions are prefixed with ./ so that they are all properly sorted.

@alexaandru alexaandru added the bug issues reporting wrong behavior label Aug 7, 2020
@erw7 erw7 added the bug-vim wrong behavior inherited from vim label Aug 7, 2020
@teto
Copy link
Member

teto commented Aug 8, 2020

may be worth reporting to vim and we will eventually port the patch.

@alexaandru
Copy link
Author

Sure, I can do that, thank you!

@alexaandru
Copy link
Author

Done: vim/vim#6665

@dundargoc dundargoc removed the bug issues reporting wrong behavior label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-vim wrong behavior inherited from vim
Projects
None yet
Development

No branches or pull requests

4 participants