[vim/vim] socketserver fixes/changes (PR #19118)

12 views
Skip to first unread message

Foxe Chen

unread,
Jan 6, 2026, 6:28:16 PM (3 days ago) Jan 6
to vim/vim, Subscribed
  • don't poll current vim instance when using serverlist()
  • however list the current vim instance in serverlist() (to match X11 behaviour)
  • don't make X11 feature disable socketserver feature: Not sure why I originally did this but oh well.

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

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

Commit Summary

  • 3d56077 don't check current vim instance when using serverlist()
  • b80af36 don't make X11 feature disable socketserver feature

File Changes

(5 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/19118@github.com>

Foxe Chen

unread,
Jan 6, 2026, 6:31:48 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.


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

Foxe Chen

unread,
Jan 6, 2026, 6:36:28 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/b827f169e143c84843a6d29bec7633fd17608b06/after/120be8f21cf4e90753f64f0a8e24948f1da511e5@github.com>

Foxe Chen

unread,
Jan 6, 2026, 6:38:27 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/120be8f21cf4e90753f64f0a8e24948f1da511e5/after/dab0cc0fa00a8d7164a3e3889f7f85d018e65879@github.com>

Foxe Chen

unread,
Jan 6, 2026, 6:40:33 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/dab0cc0fa00a8d7164a3e3889f7f85d018e65879/after/5e535fb283d28272e682ded2afe19079b998b888@github.com>

Foxe Chen

unread,
Jan 6, 2026, 6:58:58 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/5e535fb283d28272e682ded2afe19079b998b888/after/aca93bd3a7ce84e0245962f29dece494b6f75532@github.com>

Foxe Chen

unread,
Jan 6, 2026, 7:15:58 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 2 commits.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/aca93bd3a7ce84e0245962f29dece494b6f75532/after/042be089ba1303b669fd0e65fa97e11c651f132d@github.com>

Foxe Chen

unread,
Jan 6, 2026, 7:21:11 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/042be089ba1303b669fd0e65fa97e11c651f132d/after/cf9594aaea6f32071c272969efa31efcaafdd2a7@github.com>

Foxe Chen

unread,
Jan 6, 2026, 7:42:10 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/cf9594aaea6f32071c272969efa31efcaafdd2a7/after/9a85ec0b5fa1891a643e91d81b3d5724a3929dd4@github.com>

Foxe Chen

unread,
Jan 6, 2026, 8:35:09 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/9a85ec0b5fa1891a643e91d81b3d5724a3929dd4/after/77a96c702db9fa4cefc2700e64e880aea3486f6e@github.com>

Foxe Chen

unread,
Jan 6, 2026, 8:45:19 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/77a96c702db9fa4cefc2700e64e880aea3486f6e/after/e3ce84d0b95c5e775d3fe7cd68aad00e0012d28f@github.com>

Foxe Chen

unread,
Jan 6, 2026, 9:43:51 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/e3ce84d0b95c5e775d3fe7cd68aad00e0012d28f/after/ca2fe0b54859c39a274e5f8b9f3fe7f4fa0750a4@github.com>

Foxe Chen

unread,
Jan 6, 2026, 10:09:01 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/ca2fe0b54859c39a274e5f8b9f3fe7f4fa0750a4/after/889d7d961a3ae4974ddf110c946f47d3664d30ed@github.com>

Foxe Chen

unread,
Jan 6, 2026, 10:12:05 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/889d7d961a3ae4974ddf110c946f47d3664d30ed/after/2ad4598da9c806f94b844c591ff7e5a9b8f349fa@github.com>

Foxe Chen

unread,
Jan 6, 2026, 10:13:18 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/2ad4598da9c806f94b844c591ff7e5a9b8f349fa/after/41fea8f7951b484dfc7323f6d9a4b59802e5f7c9@github.com>

Foxe Chen

unread,
Jan 6, 2026, 10:15:02 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/41fea8f7951b484dfc7323f6d9a4b59802e5f7c9/after/6bf177a4ed1ff605bd74027b37a5a80da43c2542@github.com>

Foxe Chen

unread,
Jan 6, 2026, 10:26:44 PM (3 days ago) Jan 6
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/6bf177a4ed1ff605bd74027b37a5a80da43c2542/after/dc3efd4eeeee40b3843307451a6b8e89bb467883@github.com>

Foxe Chen

unread,
Jan 7, 2026, 12:51:36 AM (3 days ago) Jan 7
to vim/vim, Push

@64-bitman pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/dc3efd4eeeee40b3843307451a6b8e89bb467883/after/272dfda615867f6224bd32a580a1ad4bf3476803@github.com>

Foxe Chen

unread,
Jan 7, 2026, 12:52:24 AM (3 days ago) Jan 7
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19118)

The test test_client_server_stopinsert kept on failing on MacOS for no apparent reason so I just disabled it for Mac systems.


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/19118/c3717420105@github.com>

Christian Brabandt

unread,
Jan 7, 2026, 4:37:23 PM (2 days ago) Jan 7
to vim/vim, Subscribed

@chrisbra commented on this pull request.


In src/testdir/test_clientserver.vim:

> @@ -229,8 +230,8 @@ func Test_client_server_stopinsert()
 
   call remote_expr(name, 'execute("stopinsert")')
 
-  call assert_equal('n', name->remote_expr("mode(1)"))
-  call assert_equal('13', name->remote_expr("col('.')"))
+  call WaitForAssert({-> assert_equal('n', name->remote_expr("mode(1)"))})
+  cal WaitForAssert({-> assert_equal('13', name->remote_expr("col('.')"))})
⬇️ Suggested change
-  cal WaitForAssert({-> assert_equal('13', name->remote_expr("col('.')"))})
+  call WaitForAssert({-> assert_equal('13', name->remote_expr("col('.')"))})


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/19118/review/3636889884@github.com>

Foxe Chen

unread,
Jan 7, 2026, 4:39:19 PM (2 days ago) Jan 7
to vim/vim, Push

@64-bitman pushed 1 commit.

  • d9678cc Update test_clientserver.vim

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/272dfda615867f6224bd32a580a1ad4bf3476803/after/d9678ccb919b6330ae5f5056a89a200f659a8108@github.com>

Christian Brabandt

unread,
Jan 7, 2026, 4:39:43 PM (2 days ago) Jan 7
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19118)

Does this fix an actual bug?


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/19118/c3720920436@github.com>

Christian Brabandt

unread,
Jan 7, 2026, 4:41:53 PM (2 days ago) Jan 7
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19118)

BTW: I noticed that when socketserver is not available, test_vim9_builtin is completely skipped. Initially I added this in 4daf031 because that test failed for me in a remote ssh session (I suppose no server functionality was available). But can we move this test into the actual functions that use the socket server feature, so we skip only those tests that need to use remote feature?


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/19118/c3720926351@github.com>

Foxe Chen

unread,
Jan 7, 2026, 6:03:35 PM (2 days ago) Jan 7
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19118)

Does this fix an actual bug?

Yes it does. Before if you were to call serverlist() in a vim running as a server, there would be delay, since the vim instance would be polling for a reply from itself.

BTW: I noticed that when socketserver is not available, test_vim9_builtin is completely skipped. Initially I added this in 4daf031 because that test failed for me in a remote ssh session (I suppose no server functionality was available). But can we move this test into the actual functions that use the socket server feature, so we skip only those tests that need to use remote feature?

From what I'm getting, you want to only check for the socketserver feature in tests that need it for test_vim9_builtin? That is fine.


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/19118/c3721193021@github.com>

Christian Brabandt

unread,
Jan 8, 2026, 3:50:59 PM (yesterday) Jan 8
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19118)

Before if you were to call serverlist() in a vim running as a server, there would be delay, since the vim instance would be polling for a reply from itself.

Thanks, makes sense.

On the other thing:

From what I'm getting, you want to only check for the socketserver feature in tests that need it for test_vim9_builtin? That is fine.

But is there any test actually relying on a running socketserver feature? It doesn't seem like it and commit 96b2154 only added the test to the top level of the test file, but did not add any specific tests in test_vim9_builtin.
In other words, If I comment out that test, it runs completely fine in my env, just skipping those remote tests:

Executed Test_xor()                                in   0.000985 seconds
Executed 487 tests                       in   1.040465 seconds
SKIPPED Test_balloon_show(): only works in the GUI
SKIPPED Test_browse(): browse feature missing
SKIPPED Test_debugbreak(): only works on MS-Windows
SKIPPED Test_luaeval(): lua feature missing
SKIPPED Test_mzeval(): mzscheme feature missing
SKIPPED Test_perleval(): perl feature missing
SKIPPED Test_py3eval(): python3 feature missing
SKIPPED Test_pyeval(): python feature missing
SKIPPED Test_pyxeval(): python feature missing
SKIPPED Test_remote_expr(): Environment variable DISPLAY is not set
SKIPPED Test_remote_foreground(): not pure X11 environment
SKIPPED Test_remote_peek(): Environment variable DISPLAY is not set
SKIPPED Test_remote_read(): Environment variable DISPLAY is not set
SKIPPED Test_remote_send(): Environment variable DISPLAY is not set
SKIPPED Test_remote_startserver(): Environment variable DISPLAY is not set
SKIPPED Test_rubyeval(): ruby feature missing
SKIPPED Test_server2client(): Environment variable DISPLAY is not set
SKIPPED Test_test_gui_event(): only works in the GUI

So I think we can safely remove that CheckSocketServer check at the beginning of the file? Sorry for only being slightly related, but it bothers me, that I did not notice this earlier.


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/19118/c3725734434@github.com>

Foxe Chen

unread,
1:23 AM (16 hours ago) 1:23 AM
to vim/vim, Push

@64-bitman pushed 8 commits.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/d9678ccb919b6330ae5f5056a89a200f659a8108/after/1611436553651fff7d871af1d7afa287b695ecbb@github.com>

Foxe Chen

unread,
1:50 AM (16 hours ago) 1:50 AM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • 2cb6a89 refactor CheckSocketServer logic

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/1611436553651fff7d871af1d7afa287b695ecbb/after/2cb6a890dd7c431fd899e2ea09e949a9359522d5@github.com>

Foxe Chen

unread,
1:52 AM (16 hours ago) 1:52 AM
to vim/vim, Subscribed
64-bitman left a comment (vim/vim#19118)

I have removed the CheckSocketServer check at the top. I renamed it to RunSocketServer, since that is what actually does.


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/19118/c3727458816@github.com>

Foxe Chen

unread,
1:53 AM (16 hours ago) 1:53 AM
to vim/vim, Push

@64-bitman pushed 1 commit.

  • 0c6df58 refactor CheckSocketServer logic

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19118/before/2cb6a890dd7c431fd899e2ea09e949a9359522d5/after/0c6df5858f009e0e8f22ba028d93fdab557168ce@github.com>

Christian Brabandt

unread,
12:21 PM (5 hours ago) 12:21 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19118)

thanks


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/19118/c3729874800@github.com>

Christian Brabandt

unread,
12:35 PM (5 hours ago) 12:35 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19118)

there was one test failing test_usercommands because it suddenly saw the new command RunSocketServer so I had to adjust it slightly and delete the command.


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/19118/c3729918514@github.com>

Christian Brabandt

unread,
12:35 PM (5 hours ago) 12:35 PM
to vim/vim, Subscribed

Closed #19118 via a378c72.


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/19118/issue_event/21952505268@github.com>

Reply all
Reply to author
Forward
0 new messages