[vim/vim] Fuzzy completion doesn't work properly for Ex commands (PR #9843)

56 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Feb 24, 2022, 3:33:31 PM2/24/22
to vim/vim, Subscribed

When fuzzy completion is enabled, don't use the regular expression match.


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

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

Commit Summary

  • 9259a66 Fuzzy completion doesn't work properly for Ex commands

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843@github.com>

codecov[bot]

unread,
Feb 24, 2022, 3:41:44 PM2/24/22
to vim/vim, Subscribed

Codecov Report

Merging #9843 (9259a66) into master (4d56b97) will decrease coverage by 1.05%.
The diff coverage is 73.07%.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #9843      +/-   ##

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

- Coverage   81.80%   80.75%   -1.06%     

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

  Files         167      152      -15     

  Lines      186660   173824   -12836     

  Branches    42089    39431    -2658     

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

- Hits       152693   140363   -12330     

+ Misses      21589    20795     -794     

- Partials    12378    12666     +288     
Flag Coverage Δ
huge-clang-none 82.21% <73.07%> (+<0.01%) ⬆️
huge-gcc-none ?
huge-gcc-testgui ?
huge-gcc-unittests 2.02% <0.00%> (-0.01%) ⬇️
linux 80.75% <73.07%> (-3.05%) ⬇️
mingw-x64-HUGE ?
mingw-x64-HUGE-gui ?
windows ?

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

Impacted Files Coverage Δ
src/search.c 83.77% <ø> (-2.00%) ⬇️
src/cmdexpand.c 86.51% <73.07%> (-4.57%) ⬇️
src/libvterm/src/rect.h 0.00% <0.00%> (-96.78%) ⬇️
src/libvterm/src/state.c 34.86% <0.00%> (-54.70%) ⬇️
src/libvterm/src/keyboard.c 40.00% <0.00%> (-47.63%) ⬇️
src/libvterm/include/vterm.h 0.00% <0.00%> (-44.45%) ⬇️
src/libvterm/src/parser.c 55.41% <0.00%> (-40.49%) ⬇️
src/libvterm/src/pen.c 44.37% <0.00%> (-39.90%) ⬇️
src/libvterm/src/encoding.c 37.37% <0.00%> (-36.16%) ⬇️
src/libvterm/src/vterm.c 39.17% <0.00%> (-27.21%) ⬇️
... and 148 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 4d56b97...9259a66. Read the comment docs.


Reply to this email directly, view it on GitHub, or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/c1050244354@github.com>

Yegappan Lakshmanan

unread,
Feb 24, 2022, 9:58:21 PM2/24/22
to vim/vim, Push

@yegappan pushed 1 commit.


View it on GitHub.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/push/9197001966@github.com>

Bram Moolenaar

unread,
Feb 25, 2022, 10:25:23 AM2/25/22
to vim/vim, Subscribed

Closed #9843 via 5ec633b.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/issue_event/6139838419@github.com>

Shane-XB-Qian

unread,
Feb 25, 2022, 10:28:22 PM2/25/22
to vim/vim, Subscribed

seems became worse? cannot expand cmd which had num in it.
e.g if the cmd is Foo2Bar, then typing: foo2<tab> nothing happened...


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/c1051545070@github.com>

Yegappan Lakshmanan

unread,
Feb 26, 2022, 12:01:18 AM2/26/22
to vim_dev, reply+ACY5DGGOT4RY2O2M5U...@reply.github.com, vim/vim, Subscribed
Hi,

On Fri, Feb 25, 2022 at 7:28 PM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

seems became worse? cannot expand cmd which had num in it.
e.g if the cmd is Foo2Bar, then typing: foo2<tab> nothing happened...



This is not caused by this change. Any command that starts with a lowercase letter
is treated as an internal command and it is searched within the list of internal
commands. In this case, if you complete "Foo2" or "Bar" or "Foo", then it is correctly
expanded to "Foo2Bar".

- Yegappan

vim-dev ML

unread,
Feb 26, 2022, 12:01:33 AM2/26/22
to vim/vim, vim-dev ML, Your activity

Hi,

On Fri, Feb 25, 2022 at 7:28 PM Shane-XB-Qian ***@***.***>

wrote:

> seems became worse? cannot expand cmd which had num in it.
> e.g if the cmd is Foo2Bar, then typing: foo2<tab> nothing happened...
>
>
>
This is not caused by this change. Any command that starts with a lowercase
letter
is treated as an internal command and it is searched within the list of
internal
commands. In this case, if you complete "Foo2" or "Bar" or "Foo", then it
is correctly
expanded to "Foo2Bar".

- Yegappan


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/c1051578134@github.com>

Shane-XB-Qian

unread,
Feb 26, 2022, 12:46:25 AM2/26/22
to vim/vim, vim-dev ML, Comment

um.. I think it definitely not the 'fuzzy' should be. if should care about the upper/lower 'case' then the value of this smaller...

besides before this change/pr, this expanding in patch 4463 was working, and (not near by my pc but I remembered:) if wildmode is full also is working.

--
shane.xb.qian


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1051628172@github.com>

Yegappan Lakshmanan

unread,
Feb 26, 2022, 2:05:17 AM2/26/22
to vim_dev, reply+ACY5DGGEEHNVY73HOF...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi,

On Fri, Feb 25, 2022 at 9:46 PM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

um.. I think it definitely not the 'fuzzy' should be. if should care about the upper/lower 'case' then the value of this smaller...

besides before this change/pr, this expanding in patch 4463 was working, and (not near by my pc but I remembered:) if wildmode is full also is working.



This will be addressed by the PR https://github.com/vim/vim/pull/9849.

Regards,
Yegappan
 

vim-dev ML

unread,
Feb 26, 2022, 2:05:35 AM2/26/22
to vim/vim, vim-dev ML, Your activity

Hi,

On Fri, Feb 25, 2022 at 9:46 PM Shane-XB-Qian ***@***.***>

wrote:

> um.. I think it definitely not the 'fuzzy' should be. if should care about
> the upper/lower 'case' then the value of this smaller...
>
> besides before this change/pr, this expanding in patch 4463 was working,
> and (not near by my pc but I remembered:) if wildmode is full also is
> working.
>
>
>
This will be addressed by the PR https://github.com/vim/vim/pull/9849.

Regards,
Yegappan


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/c1051724112@github.com>

Shane-XB-Qian

unread,
Feb 26, 2022, 7:39:40 AM2/26/22
to vim/vim, vim-dev ML, Comment

thx, the 'case' looks fine now.
but if the input was heading with num e.g '2bar', then looks the num was treated as the 'range' of cmd 'bar', and doing the expanding of 'bar'............ i do not know how to workaround it or it just should be like that or it was a flaw?


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1052115349@github.com>

Shane-XB-Qian

unread,
Feb 26, 2022, 7:43:53 AM2/26/22
to vim/vim, vim-dev ML, Comment

and i opened a another ticket #9851 seg fault if set fuzzy


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1052116045@github.com>

Yegappan Lakshmanan

unread,
Feb 26, 2022, 10:22:56 AM2/26/22
to vim_dev, reply+ACY5DGDCUYBSZKVF2M...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi,

On Sat, Feb 26, 2022 at 4:43 AM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

and i opened a another ticket #9851 seg fault if set fuzzy



Thanks for testing and reporting the issue. This should be addressed by https://github.com/vim/vim/pull/9852.

Regards,
Yegappan
 

vim-dev ML

unread,
Feb 26, 2022, 10:23:16 AM2/26/22
to vim/vim, vim-dev ML, Your activity

Hi,

On Sat, Feb 26, 2022 at 4:43 AM Shane-XB-Qian ***@***.***>

wrote:

> and i opened a another ticket #9851
> <https://github.com/vim/vim/issues/9851> seg fault if set fuzzy

>
>
>
Thanks for testing and reporting the issue. This should be addressed by
https://github.com/vim/vim/pull/9852.

Regards,
Yegappan


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/c1052196527@github.com>

Bram Moolenaar

unread,
Feb 26, 2022, 10:53:36 AM2/26/22
to vim...@googlegroups.com, Shane-XB-Qian

> thx, the 'case' looks fine now.
> but if the input was heading with num e.g '2bar', then looks the num
> was treated as the 'range' of cmd 'bar', and doing the expanding of
> 'bar'............ i do not know how to workaround it or it just should
> be like that or it was a flaw?

Well, a number before a command is a range. Perhaps you have a fuzzy
match with "2bar", but I would think it is unusual to type that and
expect good suggestions. I would expect only suggestions matching
"bar". Isn't it normal that you would type the first character of the
command? So to match "MyNiceCommand", which takes a range, you could
type "123mnc" and then fuzzy complete.

--
hundred-and-one symptoms of being an internet addict:
110. You actually volunteer to become your employer's webmaster.

/// 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,
Feb 26, 2022, 7:52:27 PM2/26/22
to vim/vim, vim-dev ML, Comment

ok, yes, seg fault issue looks fixed.
// as for the expanding if had 'heading num', let it be, in the cmdline perhaps should treat it as 'range', though normally (if not in the cmdline) user perhaps used to think what his/her input was the entire content.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1052873469@github.com>

Shane-XB-Qian

unread,
Feb 27, 2022, 12:24:52 AM2/27/22
to vim/vim, vim-dev ML, Comment

one left curious question: why :killkill<tab> would not expand to :KillKillKill? :-)


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1053161743@github.com>

Yegappan Lakshmanan

unread,
Feb 27, 2022, 12:46:24 AM2/27/22
to vim_dev, reply+ACY5DGCTZ3G3V6CHWO...@reply.github.com, vim/vim, vim-dev ML, Comment
Hi,

On Sat, Feb 26, 2022 at 9:24 PM Shane-XB-Qian <vim-dev...@256bit.org> wrote:

one left curious question: why :killkill<tab> would not expand to :KillKillKill? :-)


This is a bug. Internally, if a command starts with 'k' and is followed by any character
other than 'e', then it is treated as the 'k' command. This will not work for fuzzy matching.
I will create a PR to fix this.

- Yegappan

vim-dev ML

unread,
Feb 27, 2022, 12:46:44 AM2/27/22
to vim/vim, vim-dev ML, Your activity

Hi,

On Sat, Feb 26, 2022 at 9:24 PM Shane-XB-Qian ***@***.***>

wrote:

> one left curious question: why :killkill<tab> would not expand to
> :KillKillKill? :-)
>
>
> This is a bug. Internally, if a command starts with 'k' and is followed by
any character
other than 'e', then it is treated as the 'k' command. This will not work
for fuzzy matching.
I will create a PR to fix this.

- Yegappan


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/9843/c1053183521@github.com>

Shane-XB-Qian

unread,
Feb 27, 2022, 10:12:45 PM2/27/22
to vim/vim, vim-dev ML, Comment

yes, i saw #9856 and #9858. seems fixed.
// wish fuzzy now is very well enough. :-) a very good feature of official vim!


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1053834865@github.com>

Shane-XB-Qian

unread,
Apr 29, 2022, 8:55:53 AM4/29/22
to vim/vim, vim-dev ML, Comment

#10318


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/pull/9843/c1113279592@github.com>

Reply all
Reply to author
Forward
0 new messages