Skip to content

netrw not respecting cwd on first file openning #18510

@dr0bz

Description

@dr0bz

Steps to reproduce

  1. cd to a folder with files in question: ~/workspace/playground/vim-netrw-path-issue
  2. :Explore
  3. select a file and open: config.vimrc (attached below)
  4. the opened buffer has full path in the name: ~/workspace/playground/vim-netrw-path-issue/config.vimrc
  5. repeat 2 and 3 (reopen the same file through netrw)
  6. the opened buffer has a proper name respecting the cwd: config.vimrc
screenrec-2025-10-07--14.08.mp4

Expected behaviour

netrw should respect cwd on first opening.

Version of Vim

9.1.1765

Environment

Arch linux

Logs and stack traces

" minimal config
" vim -u config.vimrc

set nocompatible
packadd netrw
let g:netrw_banner = 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions