zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.47k stars 1.16k forks source link

util: Fix opening filenames including colons with `parsecursor` #3119

Closed JoeKar closed 4 months ago

JoeKar commented 6 months ago

The regex pattern shall search for the end of the filename first as it does while opening with +LINE:COL.

In https://github.com/zyedidia/micro/blob/master/cmd/micro/micro.go#L172 we check for the end of the string as well.

Fixes #3118

JoeKar commented 6 months ago

Unfortunately the root cause of #1650 still applies in the moment parsecursor is active and the file is called e.g. file:123 or file:123:321 respective ends with :NUMBER. It's arguable a problem in the moment valid file names are parsed and become "invalid".

JoeKar commented 5 months ago

The macos build simply failed by builder timeout. Nothing special, just needs a kick...