diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-12-26 13:40:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-26 13:40:33 +0800 |
| commit | 522b15e2a4d0a0f5a9e5958efa4ffcbb3606f131 (patch) | |
| tree | 455961489867e2fa0c489a2bd4ff779a90d792fd /src/nvim/optionstr.c | |
| parent | 357aab4c65c49a924481a67e17a10bd04c334ab9 (diff) | |
| parent | 5b89d480e30367259f82680945572b1406219da5 (diff) | |
| download | rneovim-522b15e2a4d0a0f5a9e5958efa4ffcbb3606f131.tar.gz rneovim-522b15e2a4d0a0f5a9e5958efa4ffcbb3606f131.tar.bz2 rneovim-522b15e2a4d0a0f5a9e5958efa4ffcbb3606f131.zip | |
Merge pull request #21202 from luukvbaal/statusline
feat: add 'showcmdloc' option and statusline item
Diffstat (limited to 'src/nvim/optionstr.c')
| -rw-r--r-- | src/nvim/optionstr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index cd87db9aa9..106a4fbadf 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -126,6 +126,7 @@ static char *(p_icm_values[]) = { "nosplit", "split", NULL }; static char *(p_jop_values[]) = { "stack", "view", NULL }; static char *(p_tpf_values[]) = { "BS", "HT", "FF", "ESC", "DEL", "C0", "C1", NULL }; static char *(p_rdb_values[]) = { "compositor", "nothrottle", "invalid", "nodelta", NULL }; +static char *(p_sloc_values[]) = { "last", "statusline", "tabline", NULL }; /// All possible flags for 'shm'. static char SHM_ALL[] = { SHM_RO, SHM_MOD, SHM_FILE, SHM_LAST, SHM_TEXT, SHM_LINES, SHM_NEW, @@ -1275,6 +1276,10 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf && (curwin->w_p_nu || curwin->w_p_rnu)) { curwin->w_nrwidth_line_count = 0; } + } else if (varp == &p_sloc) { // 'showcmdloc' + if (check_opt_strings(p_sloc, p_sloc_values, false) != OK) { + errmsg = e_invarg; + } } else if (varp == &curwin->w_p_fdc || varp == &curwin->w_allbuf_opt.wo_fdc) { // 'foldcolumn' |
