[vim/vim] Add fuzzy matching support to the vimgrep command (#8152)

35 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Apr 25, 2021, 4:26:28 PM4/25/21
to vim/vim, Subscribed

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/8152

Commit Summary

  • Add fuzzy matching strings support to vimgrep command

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Yegappan Lakshmanan

unread,
Apr 25, 2021, 8:23:18 PM4/25/21
to vim_dev, reply+ACY5DGCXEUKHOGNIMZ...@reply.github.com, vim/vim, Subscribed
Hi,

The Github actions for this PR didn't run because it says
"This workflow is awaiting approval from a maintainer".
I haven't seen this message before.

Regards,
Yegappan

vim-dev ML

unread,
Apr 25, 2021, 8:23:36 PM4/25/21
to vim/vim, vim-dev ML, Your activity

Hi,

The Github actions for this PR didn't run because it says
"This workflow is awaiting approval from a maintainer".
I haven't seen this message before.

Regards,
Yegappan

On Sun, Apr 25, 2021 at 1:26 PM Yegappan Lakshmanan <
***@***.***> wrote:

> ------------------------------

> You can view, comment on, or merge this pull request online at:
>
> https://github.com/vim/vim/pull/8152
> Commit Summary
>
> - Add fuzzy matching strings support to vimgrep command
>
> File Changes
>
> - *M* runtime/doc/quickfix.txt
> <https://github.com/vim/vim/pull/8152/files#diff-b8a62bd8b4df13e572b6ca24cd855b598e8d69055cf742fb2b23bcd7cdf296e2>
> (13)
> - *M* src/ex_cmds.c
> <https://github.com/vim/vim/pull/8152/files#diff-036240e2e564f661297b3e05cd955286c36bc8adebfa35bc6e0acaac3b354e80>
> (6)
> - *M* src/proto/search.pro
> <https://github.com/vim/vim/pull/8152/files#diff-8a6ecb5f2e0ed9d6374b2abd8210fa52f4cc45d61fe4b7aead6bac550d4890a2>
> (1)
> - *M* src/quickfix.c
> <https://github.com/vim/vim/pull/8152/files#diff-044c1fb49b65ed4f32c8f526333ceba6e2aa59b618e0b18b1b97c87975636a9a>
> (113)
> - *M* src/search.c
> <https://github.com/vim/vim/pull/8152/files#diff-d5920a54fc6fff9b49052b09ca50c0608cf55cc93b5a46713bf8a4de1132eed0>
> (34)
> - *M* src/testdir/test_quickfix.vim
> <https://github.com/vim/vim/pull/8152/files#diff-70ab6853309b5a0f83ba72df3c82c30f9f373e01a5b3335cfc8a2c25e66e1704>
> (50)
> - *M* src/vim.h
> <https://github.com/vim/vim/pull/8152/files#diff-0f9fae9859e0cdbca395251787c939a8bf5ba976ffa1f87615936adc193f1be4>
> (4)
>
> Patch Links:
>
> - https://github.com/vim/vim/pull/8152.patch
> - https://github.com/vim/vim/pull/8152.diff

Christian Brabandt

unread,
Apr 26, 2021, 2:21:13 AM4/26/21
to vim/vim, vim-dev ML, Comment

not sure why this is needed now. I approved the GH workflow


You are receiving this because you commented.

codecov[bot]

unread,
Apr 26, 2021, 2:26:19 AM4/26/21
to vim/vim, vim-dev ML, Comment

Codecov Report

Merging #8152 (cebc3f6) into master (b98cec2) will decrease coverage by 86.87%.
The diff coverage is 0.00%.

Current head cebc3f6 differs from pull request most recent head 2a822a0. Consider uploading reports for the commit 2a822a0 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@

##           master    #8152       +/-   ##

===========================================

- Coverage   89.34%    2.47%   -86.88%     

===========================================

  Files         148      146        -2     

  Lines      166611   161491     -5120     

===========================================

- Hits       148853     3990   -144863     

- Misses      17758   157501   +139743     
Flag Coverage Δ
huge-clang-none ?
huge-gcc-none ?
huge-gcc-testgui ?
huge-gcc-unittests 2.47% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/ex_cmds.c 0.00% <0.00%> (-92.14%) ⬇️
src/quickfix.c 0.00% <0.00%> (-94.94%) ⬇️
src/search.c 0.00% <0.00%> (-92.44%) ⬇️
src/sha256.c 0.00% <0.00%> (-97.96%) ⬇️
src/digraph.c 0.00% <0.00%> (-97.78%) ⬇️
src/gui_gtk_f.c 0.00% <0.00%> (-97.54%) ⬇️
src/match.c 0.00% <0.00%> (-97.13%) ⬇️
src/crypt_zip.c 0.00% <0.00%> (-97.06%) ⬇️
src/evalbuffer.c 0.00% <0.00%> (-96.83%) ⬇️
src/debugger.c 0.00% <0.00%> (-96.62%) ⬇️
... and 137 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b98cec2...2a822a0. Read the comment docs.


You are receiving this because you commented.

Dominique Pellé

unread,
Apr 26, 2021, 2:49:20 AM4/26/21
to vim/vim, vim-dev ML, Comment

@dpelle commented on this pull request.


In src/quickfix.c:

> +		// dummy buffer, unless duplicate_name is set, then the
+		// buffer will be wiped out below.
+		if (qf_add_entry(qfl,
+			    NULL,       // dir
+			    fname,
+			    NULL,
+			    duplicate_name ? 0 : buf->b_fnum,
+			    ml_get_buf(buf,
+				regmatch->startpos[0].lnum + lnum, FALSE),
+			    regmatch->startpos[0].lnum + lnum,
+			    regmatch->startpos[0].col + 1,
+			    FALSE,      // vis_col
+			    NULL,	    // search pattern
+			    0,	    // nr
+			    0,	    // type
+			    TRUE	    // valid

Comments look misaligned.


You are receiving this because you commented.

Yegappan Lakshmanan

unread,
Apr 26, 2021, 10:47:10 AM4/26/21
to vim/vim, vim-dev ML, Push

@yegappan pushed 1 commit.


You are receiving this because you are subscribed to this thread.

View it on GitHub or unsubscribe.

Yegappan Lakshmanan

unread,
Apr 26, 2021, 11:05:20 AM4/26/21
to vim_dev, reply+ACY5DGGXR3XMTRGFQB...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi Christian,

On Sun, Apr 25, 2021 at 11:21 PM Christian Brabandt <vim-dev...@256bit.org> wrote:

not sure why this is needed now. I approved the GH workflow


It looks like Github changed the policies:
 

When I updated the PR, the Github actions now requires maintainer
approval to run again.

- Yegappan

vim-dev ML

unread,
Apr 26, 2021, 11:05:44 AM4/26/21
to vim/vim, vim-dev ML, Your activity

Bram Moolenaar

unread,
Apr 26, 2021, 3:18:41 PM4/26/21
to vim/vim, vim-dev ML, Comment

Closed #8152 via bb01a1e.


You are receiving this because you commented.

Bram Moolenaar

unread,
Apr 26, 2021, 3:26:04 PM4/26/21
to vim...@googlegroups.com, vim-dev ML


> The Github actions for this PR didn't run because it says
> "This workflow is awaiting approval from a maintainer".
> I haven't seen this message before.

Looks like there is no way around this. I hope we can approve quickly,
but it does require one of the maintainers to spot the request.

I also found a way to add the author to the commit. I hope that works,
then the number of approvals should also be reduced.


--
If Microsoft would build a car...
... The airbag system would ask "are you SURE?" before deploying.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Shane-XB-Qian

unread,
Apr 27, 2021, 12:55:09 AM4/27/21
to vim/vim, vim-dev ML, Comment

not sure why this is needed now

some hacker using pr action to dig coin, i guess that's the why, and so check pr (specially for ci 'action') carefully as well.


You are receiving this because you commented.

Shane-XB-Qian

unread,
Apr 27, 2021, 2:01:07 AM4/27/21
to vim/vim, vim-dev ML, Comment

seems just added [f] into quickfix.txt, but did not mentioned what's that use for..
// supposed would update at next runtime update?


You are receiving this because you commented.

Christian Brabandt

unread,
Apr 27, 2021, 2:08:41 AM4/27/21
to vim/vim, vim-dev ML, Comment

Thanks, this is unfortunately a bit annoying. I will check the PR page then more actively and see if I need to approve anything.


You are receiving this because you commented.

Shane-XB-Qian

unread,
Apr 27, 2021, 3:45:06 AM4/27/21
to vim/vim, vim-dev ML, Comment

github network for page and feed recently is abnormal too (or just in some country).
// above 2 links cannot be opened, but I Guess pr action was limited due to that..


You are receiving this because you commented.

Yegappan Lakshmanan

unread,
Apr 27, 2021, 11:15:58 AM4/27/21
to vim_dev, reply+ACY5DGBLMIBMQXCBQF...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi,

On Mon, Apr 26, 2021 at 11:01 PM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

seems just added [f] into quickfix.txt, but did not mentioned what's that use for..
// supposed would update at next runtime update?



My pull request includes the updates to the help files. I guess it will
show up when Bram pushes the next runtime file updates.

- Yegappan

vim-dev ML

unread,
Apr 27, 2021, 11:16:20 AM4/27/21
to vim/vim, vim-dev ML, Your activity

Hi,

On Mon, Apr 26, 2021 at 11:01 PM Shane-XB-Qian ***@***.***>

wrote:

> seems just added [f] into quickfix.txt, but did not mentioned what's that
> use for..
> // supposed would update at next runtime update?
>
>
>
My pull request includes the updates to the help files. I guess it will
show up when Bram pushes the next runtime file updates.

- Yegappan

Bram Moolenaar

unread,
Apr 27, 2021, 2:09:28 PM4/27/21
to vim...@googlegroups.com, vim-dev ML

> On Mon, Apr 26, 2021 at 11:01 PM Shane-XB-Qian ***@***.***>
> wrote:
>
> > seems just added [f] into quickfix.txt, but did not mentioned what's that
> > use for..
> > // supposed would update at next runtime update?
> >
> >
> >
> My pull request includes the updates to the help files. I guess it will
> show up when Bram pushes the next runtime file updates.

The change this also add this text:

+
+ When the 'f' flag is specified, fuzzy string matching
+ is used to find matching lines. In this case,
+ {pattern} is treated as a literal string instead of a
+ regular expression. See |matchfuzzy()| for more info
+ about fuzzy matching.
+
+ |QuickFixCmdPre| and |QuickFixCmdPost| are triggered.
+ A file that is opened for matching may use a buffer
+ number, but it is reused if possible to avoid
+ consuming buffer numbers.
+


--
Wizards had always known that the act of observation changed the thing that
was observed, and sometimes forgot that it also changed the observer too.
Terry Pratchett - Interesting times
Reply all
Reply to author
Forward
0 new messages