Lines Matching refs:current_state

350  * When current_state.ga_itemsize is 0 the current state is invalid.
360 static garray_T current_state /* current stack of state_items */
366 #define CUR_STATE(idx) ((stateitem_T *)(current_state.ga_data))[idx]
482 * After switching buffers, invalidate current_state.
506 if (VALID_STATE(&current_state)
520 * current_state and figure it out below.
532 if (INVALID_STATE(&current_state) && syn_block->b_sst_array != NULL)
554 if (INVALID_STATE(&current_state))
658 * Cleanup the current_state stack.
666 sip = (stateitem_T *)(current_state.ga_data);
667 for (i = 0; i < current_state.ga_len; i++)
669 ga_clear(&current_state);
780 update_si_attr(current_state.ga_len - 1);
845 if (had_sync_point && current_state.ga_len)
847 cur_si = &CUR_STATE(current_state.ga_len - 1);
912 update_si_attr(current_state.ga_len - 1);
922 if (current_state.ga_len)
924 cur_si = &CUR_STATE(current_state.ga_len - 1);
987 if (current_state.ga_len > 0)
1011 for (i = 0; i < current_state.ga_len; ++i)
1037 i = current_state.ga_len - 1;
1044 for ( ; i < current_state.ga_len; ++i)
1049 || (i == current_state.ga_len - 1 && startofline))
1406 for (i = current_state.ga_len - 1; i >= 0; --i)
1480 sp->sst_stacksize = current_state.ga_len;
1481 if (current_state.ga_len > SST_FIX_STATES)
1486 if (ga_grow(&sp->sst_union.sst_ga, current_state.ga_len) == FAIL)
1489 sp->sst_union.sst_ga.ga_len = current_state.ga_len;
1514 * Copy a state stack from "from" in b_sst_array[] to current_state;
1527 && ga_grow(&current_state, from->sst_stacksize) != FAIL)
1553 current_state.ga_len = from->sst_stacksize;
1573 if (sp->sst_stacksize == current_state.ga_len
1582 for (i = current_state.ga_len; --i >= 0; )
1659 current_state.ga_itemsize = 0; /* mark current_state invalid */
1667 current_state.ga_itemsize = sizeof(stateitem_T);
1668 current_state.ga_growsize = 3;
1690 if (VALID_STATE(&current_state) && lnum == current_lnum + 1)
1740 if (syncing && current_state.ga_len)
1745 cur_si = &CUR_STATE(current_state.ga_len - 1);
1808 /* Make sure current_state is valid */
1809 if (INVALID_STATE(&current_state))
1929 if (current_state.ga_len)
1930 cur_si = &CUR_STATE(current_state.ga_len - 1);
1961 cur_si = &CUR_STATE(current_state.ga_len - 1);
1975 if (current_state.ga_len > 1)
1977 CUR_STATE(current_state.ga_len - 2).si_flags
1984 if (current_state.ga_len < 2)
1992 current_state.ga_len - 2).si_attr;
1994 current_state.ga_len - 2).si_trans_id;
2286 for (idx = current_state.ga_len - 1; idx >= 0; --idx)
2371 if (current_state.ga_len > 0
2415 for (i = current_state.ga_len; --i >= 0; )
2445 * Push the item in current_state stack;
2453 cur_si = &CUR_STATE(current_state.ga_len - 1);
2461 if (current_state.ga_len > 1)
2463 CUR_STATE(current_state.ga_len - 2).si_flags & HL_CONCEAL;
2483 keepend_level = current_state.ga_len - 1;
2485 update_si_attr(current_state.ga_len - 1);
2498 cur_si = &CUR_STATE(current_state.ga_len - 1);
2515 update_si_attr(current_state.ga_len - 1);
2533 cur_si = &CUR_STATE(current_state.ga_len - 1);
2562 update_si_attr(current_state.ga_len - 1);
2586 if (current_state.ga_len == 0)
2592 if (current_state.ga_len == 0)
2596 cur_si = &CUR_STATE(current_state.ga_len - 1);
2627 * Update an entry in the current_state stack for a match or region. This
2706 for (i = current_state.ga_len - 1; i > keepend_level; --i)
2714 for ( ; i < current_state.ga_len; ++i)
2741 * Update an entry in the current_state stack for a start-skip-end pattern.
2816 if (ga_grow(&current_state, 1) == FAIL)
2818 vim_memset(&CUR_STATE(current_state.ga_len), 0, sizeof(stateitem_T));
2819 CUR_STATE(current_state.ga_len).si_idx = idx;
2820 ++current_state.ga_len;
2825 * Remove a state from the current_state stack.
2830 if (current_state.ga_len)
2832 unref_extmatch(CUR_STATE(current_state.ga_len - 1).si_extmatch);
2833 --current_state.ga_len;
2839 if (keepend_level >= current_state.ga_len)
6037 && cur_si > (stateitem_T *)(current_state.ga_data))
6389 if (i >= current_state.ga_len)
6418 for (i = 0; i < current_state.ga_len; ++i)