mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lint
This commit is contained in:
parent
c8b40930c0
commit
6cf186edb5
@ -4619,10 +4619,10 @@ static int findoption(const char *const arg)
|
||||
/// Hidden Number or Toggle option: -1.
|
||||
/// hidden String option: -2.
|
||||
/// unknown option: -3.
|
||||
int get_option_value (
|
||||
int get_option_value(
|
||||
char_u *name,
|
||||
long *numval,
|
||||
char_u **stringval, /* NULL when only checking existence */
|
||||
char_u **stringval, ///< NULL when only checking existence
|
||||
int opt_flags
|
||||
)
|
||||
{
|
||||
@ -4630,32 +4630,31 @@ int get_option_value (
|
||||
return 0;
|
||||
}
|
||||
|
||||
int opt_idx;
|
||||
char_u *varp;
|
||||
|
||||
opt_idx = findoption((const char *)name);
|
||||
int opt_idx = findoption((const char *)name);
|
||||
if (opt_idx < 0) { // Unknown option.
|
||||
return -3;
|
||||
}
|
||||
|
||||
varp = get_varp_scope(&(options[opt_idx]), opt_flags);
|
||||
char_u *varp = get_varp_scope(&(options[opt_idx]), opt_flags);
|
||||
|
||||
if (options[opt_idx].flags & P_STRING) {
|
||||
if (varp == NULL) /* hidden option */
|
||||
if (varp == NULL) { // hidden option
|
||||
return -2;
|
||||
}
|
||||
if (stringval != NULL) {
|
||||
*stringval = vim_strsave(*(char_u **)(varp));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (varp == NULL) /* hidden option */
|
||||
if (varp == NULL) { // hidden option
|
||||
return -1;
|
||||
if (options[opt_idx].flags & P_NUM)
|
||||
}
|
||||
if (options[opt_idx].flags & P_NUM) {
|
||||
*numval = *(long *)varp;
|
||||
else {
|
||||
/* Special case: 'modified' is b_changed, but we also want to consider
|
||||
* it set when 'ff' or 'fenc' changed. */
|
||||
} else {
|
||||
// Special case: 'modified' is b_changed, but we also want to consider
|
||||
// it set when 'ff' or 'fenc' changed.
|
||||
if ((int *)varp == &curbuf->b_changed) {
|
||||
*numval = curbufIsChanged();
|
||||
} else {
|
||||
|
@ -4,7 +4,7 @@ local os = require('os')
|
||||
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
||||
local command = helpers.command
|
||||
local eval, exc_exec = helpers.eval, helpers.exc_exec
|
||||
local feed_command, request, eq = helpers.feed_command, helpers.request, helpers.eq
|
||||
local feed_command, eq = helpers.feed_command, helpers.eq
|
||||
local curbufmeths = helpers.curbufmeths
|
||||
|
||||
describe('colorscheme compatibility', function()
|
||||
|
Loading…
Reference in New Issue
Block a user