Skip to content

Instantly share code, notes, and snippets.

@thinca
Last active March 18, 2016 00:17
Show Gist options
  • Save thinca/17040dc76c0be8b4c162 to your computer and use it in GitHub Desktop.
Save thinca/17040dc76c0be8b4c162 to your computer and use it in GitHub Desktop.
fix type() for partial
diff --git a/src/eval.c b/src/eval.c
index 6280323..5fce7d7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -20385,6 +20385,7 @@ f_type(typval_T *argvars, typval_T *rettv)
{
case VAR_NUMBER: n = 0; break;
case VAR_STRING: n = 1; break;
+ case VAR_PARTIAL:
case VAR_FUNC: n = 2; break;
case VAR_LIST: n = 3; break;
case VAR_DICT: n = 4; break;
@@ -20398,7 +20399,6 @@ f_type(typval_T *argvars, typval_T *rettv)
break;
case VAR_JOB: n = 8; break;
case VAR_CHANNEL: n = 9; break;
- case VAR_PARTIAL: n = 10; break;
case VAR_UNKNOWN:
EMSG2(_(e_intern2), "f_type(UNKNOWN)");
n = -1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment