[vim/vim] allow get/set tab-local 'cmdheight' via gettabvar()/settabvar() (PR #15713)

19 views
Skip to first unread message

Milly

unread,
Sep 20, 2024, 5:25:15 PM9/20/24
to vim/vim, Subscribed

Fixes #4324.
Related #13893.


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

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

Commit Summary

  • 0fd2cd8 test: add missing tests
  • 5f03d9e test: fix tabpage cmdheight test
  • 434a353 feat: get tab-local options by gettabvar()
  • 95d6645 feat: set tab-local options by settabvar()

File Changes

(11 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/15713@github.com>

zeertzjq

unread,
Sep 20, 2024, 8:09:57 PM9/20/24
to vim/vim, Subscribed

@zeertzjq commented on this pull request.


In src/option.h:

> @@ -1339,6 +1339,17 @@ enum
     , WV_COUNT	    // must be the last one
 };
 
+/*
+ * "indir" values for tab-local options.
+ * These need to be defined globally, so that the TV_COUNT can be used in the

TV_COUNT isn't used anywhere


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/15713/review/2319524560@github.com>

Milly

unread,
Sep 21, 2024, 4:21:33 AM9/21/24
to vim/vim, Subscribed

@Milly commented on this pull request.


In src/option.h:

> @@ -1339,6 +1339,17 @@ enum
     , WV_COUNT	    // must be the last one
 };
 
+/*
+ * "indir" values for tab-local options.
+ * These need to be defined globally, so that the TV_COUNT can be used in the

Yes. Fix the comment or remove the definition?


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/15713/review/2319687261@github.com>

zeertzjq

unread,
Sep 21, 2024, 5:03:48 AM9/21/24
to vim/vim, Subscribed

@zeertzjq commented on this pull request.


In src/option.h:

> @@ -1339,6 +1339,17 @@ enum
     , WV_COUNT	    // must be the last one
 };
 
+/*
+ * "indir" values for tab-local options.
+ * These need to be defined globally, so that the TV_COUNT can be used in the

Actually I think that means the implementation is incomplete. BV_COUNT and WV_COUNT are used for arrays that store script contexts that set local options, so if 'cmdheight' needs to be a fully tab-local option it's necessary to store a script context with the tabpage as well.


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/15713/review/2319692368@github.com>

Milly

unread,
Sep 21, 2024, 6:50:36 AM9/21/24
to vim/vim, Subscribed

@Milly commented on this pull request.


In src/option.h:

> @@ -1339,6 +1339,17 @@ enum
     , WV_COUNT	    // must be the last one
 };
 
+/*
+ * "indir" values for tab-local options.
+ * These need to be defined globally, so that the TV_COUNT can be used in the

I think that should be done in a separate PR about cmdheight.


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/15713/review/2319710828@github.com>

Christian Brabandt

unread,
Sep 22, 2024, 5:35:03 AM9/22/24
to vim/vim, Subscribed

@chrisbra commented on this pull request.


In src/option.h:

> @@ -1339,6 +1339,17 @@ enum
     , WV_COUNT	    // must be the last one
 };
 
+/*
+ * "indir" values for tab-local options.
+ * These need to be defined globally, so that the TV_COUNT can be used in the

Yeah, but we should still remember when this option was (re-)set right?


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/15713/review/2320626445@github.com>

Milly

unread,
Sep 23, 2024, 1:04:40 AM9/23/24
to vim/vim, Subscribed

@Milly commented on this pull request.


In src/option.h:

> @@ -1339,6 +1339,17 @@ enum
     , WV_COUNT	    // must be the last one
 };
 
+/*
+ * "indir" values for tab-local options.
+ * These need to be defined globally, so that the TV_COUNT can be used in the

I'll write another PR to make cmdheight as a true tab-local option.
And in the meantime I'd like to mark this PR as a WIP.


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/15713/review/2321133434@github.com>

Christian Brabandt

unread,
Jun 13, 2026, 4:16:24 PM (10 hours ago) Jun 13
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#15713)

this has stalled, so closing


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15713/c4699667928@github.com>

Reply all
Reply to author
Forward
0 new messages