macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.47k stars 680 forks source link

Regex isn't working properly #1368

Closed frankjonen closed 1 year ago

frankjonen commented 1 year ago

Steps to reproduce

Example1: https://vim.fandom.com/wiki/Regex_lookahead_and_lookbehind

  1. Put: The quick fox jumps over the lazy brown dog. in an empty buffer.
  2. Search with /brown\( fox\)\e=

Brings up an error message instead of the word brown.

You can try the rest on that page. None work. Syntax files using /zs also have issues not selecting.

Expected behaviour

Should select the word brown in provided example.

Version of Vim and architecture

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 15 2022 18:56:17) macOS version - x86_64 Included patches: 1-472 Compiled by Homebrew

Environment

macOS Monterey GUI

How MacVim was installed

Homebrew

Logs and stack traces

No response

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

Issue has been tested with no configuration

Other conditions

ychin commented 1 year ago

Seems to work just fine for me? You didn't copy the example verbatim. It should be "quick brown fox" in the text, and you need to use \@=, \@!, or \ze, not \e or /zs. These details do matter a bit.

frankjonen commented 1 year ago

You can close it. I've been looking at it too long to see the issue. Turns out it wasn't Vim but some override that blocked the /zs /ze selections I needed. Took me some hours to find the lead.

ychin commented 1 year ago

Ah ok. Yeah we have all done that 😅.