diff src/syntax.c @ 1500:ea9f418ed072 v7.1.215

updated for version 7.1-215
author vimboss
date Thu, 10 Jan 2008 21:24:39 +0000
parents 8ac6392acb0a
children 995536cad50e
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -6105,6 +6105,22 @@ syn_get_id(wp, lnum, col, trans, spellp)
     return (trans ? current_trans_id : current_id);
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
+/*
+ * Return the syntax ID at position "i" in the current stack.
+ * The caller must have called syn_get_id() before to fill the stack.
+ * Returns -1 when "i" is out of range.
+ */
+    int
+syn_get_stack_item(i)
+    int i;
+{
+    if (i >= current_state.ga_len )
+	return -1;
+    return CUR_STATE(i).si_id;
+}
+#endif
+
 #if defined(FEAT_FOLDING) || defined(PROTO)
 /*
  * Function called to get folding level for line "lnum" in window "wp".