[vim/vim] let 'previewpopup' like 'completepopup' (PR #18873)

21 views
Skip to first unread message

arkissa

unread,
Dec 6, 2025, 1:55:55 AM12/6/25
to vim/vim, Subscribed

I’ve seen many separate checks in the code specifically for the preview popup window, blocking certain parameters. I’m not familiar with Vim’s codebase, and I don’t really understand why this is done. My understanding is that a preview popup window is just a normal popup window (please correct me if I’m wrong), I also don’t really get why those checks are needed. This PR is meant to address the issue in #18826 and allow previewpopup to have richer configuration, so I removed some of the checks that tested whether a popup was a preview. I’m not sure what side effects this might cause.


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

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

Commit Summary

  • e87e88a feat: Add more settings to 'previewpopup' like 'completepopup'
  • 3aa549e update: changed 'previewpopup' test cases.
  • f97487c runtime(doc): 'previewpopup' referenced from 'completepopup'.

File Changes

(4 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/18873@github.com>

arkissa

unread,
Dec 6, 2025, 1:58:35 AM12/6/25
to vim/vim, Subscribed
Arkissa left a comment (vim/vim#18873)

@girishji @chrisbra Please review this PR


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/18873/c3619666643@github.com>

Christian Brabandt

unread,
Dec 9, 2025, 7:18:54 AM12/9/25
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18873)

this needs a bit of updates to the documentation, I guess we need to also link from 'previewpopup' (this should also document what values can actually be set) to 'pumborder'?. Also, can you please update the tests for all possible option values that this allows then?


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/18873/c3631965316@github.com>

arkissa

unread,
Jan 23, 2026, 9:08:04 AMJan 23
to vim/vim, Push

@Arkissa pushed 3 commits.

  • af1d3ad feat: Add more settings to 'previewpopup' like 'completepopup'
  • 75fb8e0 update: changed 'previewpopup' test cases.
  • b7e968e runtime(doc): 'previewpopup' referenced from 'completepopup'.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18873/before/f97487cf002e103c28e564f8e76d3e01fb66d38d/after/b7e968efa2ce84dc5d73c1b48d8d0d4fda76d8a1@github.com>

arkissa

unread,
Jan 23, 2026, 10:31:45 AMJan 23
to vim/vim, Push

@Arkissa pushed 2 commits.

  • dc63584 update: delete align options value.
  • 17d111e runtime(doc): Update 'previewpopup' option values information.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18873/before/b7e968efa2ce84dc5d73c1b48d8d0d4fda76d8a1/after/17d111eb5dede6345d336b014e7d748a38f53d58@github.com>

arkissa

unread,
Jan 23, 2026, 10:50:35 AMJan 23
to vim/vim, Push

@Arkissa pushed 2 commits.

  • 00c46ff runtime(doc): Update 'previewpopup' option values information.
  • af93d70 update: previewpopup first value.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18873/before/17d111eb5dede6345d336b014e7d748a38f53d58/after/af93d703d19a65ae210be38f6deab2d28bb00258@github.com>

arkissa

unread,
Jan 23, 2026, 1:02:18 PMJan 23
to vim/vim, Subscribed
Arkissa left a comment (vim/vim#18873)

Sorry, I finally found some time to look this pr.

Also, can you please update the tests for all possible option values that this allows then?

I've use some time understanding how to use and create test cases, i will be update it later.
but i have same questions, the 'previewpopup' has borders by default, and now that we have a border option to configure, should this default border be retained or removed and left to the option to configure? @chrisbra

this is result.
image.png (view on web)


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/18873/c3791547345@github.com>

arkissa

unread,
Jan 24, 2026, 1:05:34 AMJan 24
to vim/vim, Push

@Arkissa pushed 1 commit.

  • 204e92d fix: test case to failed.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18873/before/af93d703d19a65ae210be38f6deab2d28bb00258/after/204e92d53fc153ffd2128eafbf8e7d4dd6ba879a@github.com>

arkissa

unread,
Jan 24, 2026, 5:07:48 AMJan 24
to vim/vim, Push

@Arkissa pushed 2 commits.

  • f3f2cf7 update: close:on by default
  • f5e3f88 feat: previewpopup test cases.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18873/before/204e92d53fc153ffd2128eafbf8e7d4dd6ba879a/after/f5e3f882de06d922178cbdb42a287a909c144f13@github.com>

girish

unread,
Jan 24, 2026, 12:57:34 PMJan 24
to vim/vim, Subscribed

@girishji commented on this pull request.


In runtime/doc/windows.txt:

> @@ -957,8 +957,17 @@ settings.  The option is a comma-separated list of values:
 	height		maximum height of the popup
 	width		maximum width of the popup
 	highlight	highlight group of the popup (default is Pmenu)
+	border		border style see 'pumborder'
	border		border style (see 'pumborder')

In runtime/doc/windows.txt:

> @@ -957,8 +957,17 @@ settings.  The option is a comma-separated list of values:
 	height		maximum height of the popup
 	width		maximum width of the popup
 	highlight	highlight group of the popup (default is Pmenu)
+	border		border style see 'pumborder'
+	borderhighlight	highlight group for the popup border characters
+	close		show close button: "on" (default) or "off", if
+			the value is "on", it must be set after border.

close		show close button: "on" (default) or "off", and if
			the value is "on", it must be set after border.

In runtime/doc/windows.txt:

>  Example: >
 	:set previewpopup=height:10,width:60
+	:set previewpopup=height:10,width:60,border:single,borderhilight:PmenuBorder
+	:set previewpopup=height:10,width:60,border:custom:─;│;─;│;┌;┐;┘;└,borderhilight:PmenuBorder
	:set border:single,borderhilight:PmenuBorder
	:set border:custom:─;│;─;│;┌;┐;┘;└

In src/popupwin.c:

> @@ -1988,9 +1988,9 @@ parse_popup_option(win_T *wp, int is_preview)
 	    int		on = STRNCMP(arg, "on", 2) == 0 && arg + 2 == p;
 	    int		off = STRNCMP(arg, "off", 3) == 0 && arg + 3 == p;
 
-	    if ((!on && !off) || is_preview)
+	    if ((!on && !off))

redundant ()


In src/popupwin.c:

> @@ -2000,7 +2000,7 @@ parse_popup_option(win_T *wp, int is_preview)
 	    int		on = STRNCMP(arg, "on", 2) == 0 && arg + 2 == p;
 	    int		off = STRNCMP(arg, "off", 3) == 0 && arg + 3 == p;
 
-	    if ((!on && !off) || is_preview)
+	    if ((!on && !off))

redundant ()


In src/popupwin.c:

> @@ -2016,7 +2016,7 @@ parse_popup_option(win_T *wp, int is_preview)
 	    int		on = STRNCMP(arg, "on", 2) == 0 && arg + 2 == p;
 	    int		off = STRNCMP(arg, "off", 3) == 0 && arg + 3 == p;
 
-	    if ((!on && !off) || is_preview)
+	    if ((!on && !off))

redundant ()


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

arkissa

unread,
Jan 26, 2026, 10:43:03 AMJan 26
to vim/vim, Push

@Arkissa pushed 10 commits.

  • 6c67aa8 feat: Add more settings to 'previewpopup' like 'completepopup'
  • 09cc807 update: changed 'previewpopup' test cases.
  • 947cd2d runtime(doc): 'previewpopup' referenced from 'completepopup'.
  • c8fee53 update: delete align options value.
  • d96f0ff runtime(doc): Update 'previewpopup' option values information.
  • 3ecf81f update: previewpopup first value.
  • 2d3bed1 fix: test case to failed.
  • 08abea3 update: close:on by default
  • 57e6b96 feat: previewpopup test cases.
  • fae0561 fix: resolve conversation.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/18873/before/f5e3f882de06d922178cbdb42a287a909c144f13/after/fae056154ce0c98f0d36e339d4d991532d0cc347@github.com>

girish

unread,
Feb 21, 2026, 5:43:09 PM (yesterday) Feb 21
to vim/vim, Subscribed

@girishji approved this pull request.


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

Reply all
Reply to author
Forward
0 new messages