summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-01-10 21:24:39 +0000
committerBram Moolenaar <Bram@vim.org>2008-01-10 21:24:39 +0000
commit9d188ab0877700f215b23c17ef254770605ec134 (patch)
tree99f7e2dfb06677c0c7970bc9b31be5ff29312434 /src/syntax.c
parentbd7cc03e57c71f3e3c0c7ca72489a4108d5af7d1 (diff)
downloadvim-git-9d188ab0877700f215b23c17ef254770605ec134.tar.gz
updated for version 7.1-215v7.1.215
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index e321313be..f9fbb0129 100644
--- 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".