[vim/vim] Fix :endclass :endenum :endinterface giving errors (PR #20253)

2 views
Skip to first unread message

Peter Kenny

unread,
May 19, 2026, 5:41:19 PM (3 days ago) May 19
to vim/vim, Subscribed

This fixes :endclass, :endenum, and :endinterface from giving errors, which appears to have been unintentional. [The errors currently, with screenshots, and discussion on the matter can be found in #20191]

The test file src/testdir/test_vim9_class.vim is updated to test these as well as adding basic tests for enum and interface. They are also in 20191, which can easily be aligned after this PR is merged.


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

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

Commit Summary

  • 73dde42 Fix :endclass :endenum :endinterface giving errors

File Changes

(2 files)

Patch Links:


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

dkearns

unread,
May 20, 2026, 11:37:02 AM (2 days ago) May 20
to vim/vim, Subscribed

@dkearns commented on this pull request.


In src/vim9class.c:

>  	if (checkforcmd(&p, end_name, shortlen))
 	{
-	    if (STRNCMP(line, end_name, fullen) != 0)
+	    if (STRNCMP(cmd_start, end_name, fullen) != 0)
 		semsg(_(e_command_cannot_be_shortened_str), line);


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/20253/review/4329907908@github.com>

dkearns

unread,
May 20, 2026, 11:38:30 AM (2 days ago) May 20
to vim/vim, Subscribed
dkearns left a comment (vim/vim#20253)

Thanks, this was little irksome. :)


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/20253/c4499954125@github.com>

dkearns

unread,
May 20, 2026, 11:39:55 AM (2 days ago) May 20
to vim/vim, Subscribed
dkearns left a comment (vim/vim#20253)

Thanks, this was little irksome. :)


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/20253/c4499954125@github.com>

Peter Kenny

unread,
May 21, 2026, 11:06:39 PM (10 hours ago) May 21
to vim/vim, Push

@kennypete pushed 1 commit.

  • d45aa3a Fix :endclass :endenum :endinterface giving errors


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/20253/before/73dde4282acf9852048a1f76647d9a3709db41f3/after/d45aa3ab01420713e4c49c13683e72915ad3664b@github.com>

Peter Kenny

unread,
May 21, 2026, 11:14:42 PM (10 hours ago) May 21
to vim/vim, Subscribed

@kennypete commented on this pull request.


In src/vim9class.c:

>  	if (checkforcmd(&p, end_name, shortlen))
 	{
-	    if (STRNCMP(line, end_name, fullen) != 0)
+	    if (STRNCMP(cmd_start, end_name, fullen) != 0)
 		semsg(_(e_command_cannot_be_shortened_str), line);

Fixed, and tests have been added for them, which run clean. I also added tests with colon+whitespace variants, which revealed :public gives E1065, though that can wait for another day (and the test has a TODO and : public commented).


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/20253/review/4342188951@github.com>

Reply all
Reply to author
Forward
0 new messages