micro icon indicating copy to clipboard operation
micro copied to clipboard

basename option doesn't work with Windows backslash paths

Open jessepav opened this issue 4 years ago • 1 comments

Description of the problem or steps to reproduce

  1. > set basename true
  2. Open any file outside of the current directory, using backslash paths

Specifications

Commit hash: 6bc498e6 OS: Windows 10 Terminal: Windows Console

jessepav avatar Jun 22 '21 16:06 jessepav

I have fixed it with my own build of micro.

In file "./micro/internal/buffer/buffer.go:

  1. At line 12, comment out '"path"' (from the import section)
  2. At line 472, changed "path" to "filepath", resulting in return filepath.Base(name)

Build your own micro, with make build. If you don't have make for Windows, check this out: http://gnuwin32.sourceforge.net/packages/make.htm

Official build guide: https://github.com/zyedidia/micro#building-from-source

333van avatar Jun 07 '22 07:06 333van