[vim/vim] Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end (PR #13362)

5 views
Skip to first unread message

Yee Cheng Chin

unread,
Oct 16, 2023, 9:38:26 PM10/16/23
to vim/vim, Subscribed

A few places in the cmdline completion code only works properly when the user hits Tab (or 'wildchar') at the end of the cmdline, even though it's supposed to work even in the middle of the line.

For fuzzy search, :e ++ff, and :set hl=, fix completion code to make sure to use xp_pattern_len instead of assuming the entire xp_pattern is the search pattern (since it contains texts after the cursor).

Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a wildmenu completion. Also, make them work even when not using set wildoptions+=pum as there is no drawback to doing so. (Related issue where this was brought up: #13331)


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

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

Commit Summary

  • ed31c9f Fix wildchar/wildmenu/pum memory corruption with special wildchar's
  • 503b5fc Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end

File Changes

(16 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13362@github.com>

Yee Cheng Chin

unread,
Oct 16, 2023, 9:39:33 PM10/16/23
to vim/vim, Subscribed

This PR is based on #13361. I decided to split into 2 separate PRs because that PR fixes a more important memory corruption issue and fixes a different issue than this one which is more a simple enhancement. Just sending both PRs out to make it see what the total change is. You could combine the two together if you want.


Reply to this email directly, view it on GitHub.

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

Yee Cheng Chin

unread,
Oct 16, 2023, 9:51:15 PM10/16/23
to vim/vim, Push

@ychin pushed 1 commit.

  • b62207a Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13362/push/15444279404@github.com>

Yee Cheng Chin

unread,
Oct 16, 2023, 11:02:46 PM10/16/23
to vim/vim, Push

@ychin pushed 2 commits.

  • 9c72e17 Fix wildchar/wildmenu/pum memory corruption with special wildchar's
  • d6ea0e9 Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13362/push/15444804966@github.com>

Yee Cheng Chin

unread,
Oct 17, 2023, 4:58:07 AM10/17/23
to vim/vim, Push

@ychin pushed 1 commit.

  • 359e1a7 Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/13362/push/15448306598@github.com>

Christian Brabandt

unread,
Oct 17, 2023, 4:58:33 AM10/17/23
to vim/vim, Subscribed

Closed #13362 via 209ec90.


Reply to this email directly, view it on GitHub.

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

Christian Brabandt

unread,
Oct 17, 2023, 4:58:38 AM10/17/23
to vim/vim, Subscribed

thanks, I just included the second commit


Reply to this email directly, view it on GitHub.

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

Reply all
Reply to author
Forward
0 new messages