Lines Matching refs:state

6 " Description:	HTML indent script with cached state for faster indenting on a
44 " b:hi_indent keeps state to speed up indenting consecutive lines.
286 let s:countonly = 1 " don't change state
408 " Look back in the file, starting at a:lnum - 1, to compute a state for the
409 " start of line a:lnum. Return the new state.
412 " A state is to know ALL relevant details about the
417 " not need to clear the whole state and re-detect the block type again.
429 let state = {}
430 let state.lnum = prevnonblank(a:lnum - 1)
431 let state.scripttype = ""
432 let state.blocktagind = -1
433 let state.block = 0
434 let state.baseindent = 0
435 let state.blocklnr = 0
436 let state.inattr = 0
438 if state.lnum == 0
439 return state
443 " remember startline state.lnum
471 let state.block = s:indent_tags[blocktag]
472 if state.block == 3
473 let state.scripttype = s:GetScriptType(matchstr(tagline, '\>[^>]*', stopcol))
475 let state.blocklnr = stopline
478 let state.blocktagind = indent(stopline) + (s:curind + s:nextrel) * shiftwidth()
479 return state
480 elseif stopline == state.lnum
481 " handle special case: previous line (= state.lnum) contains a
488 let state.baseindent = indent(bline) + (s:curind + s:nextrel) * shiftwidth()
489 return state
502 let state.block = (found == 3 ? 5 : 6)
503 let state.blocklnr = comlnum
507 let state.baseindent = b:hi_indent.baseindent
509 let state.blocktagind = indent(comlnum) + (s:curind + s:nextrel) * shiftwidth()
510 return state
514 let text = tolower(getline(state.lnum))
520 call cursor(state.lnum, comcol + 1)
522 if comlnum == state.lnum
528 let state.baseindent = indent(comlnum) + (s:curind + s:nextrel) * shiftwidth()
530 return state
538 call cursor(state.lnum, 99999)
542 let state.baseindent = indent(start_lnum)
548 let state.baseindent += s:nextrel * shiftwidth()
550 let state.baseindent += s:curind * shiftwidth()
553 return state
558 let [state.lnum, found] = HtmlIndent_FindTagStart(state.lnum)
560 let text = getline(state.lnum)
563 let state.baseindent = indent(state.lnum) + s:nextrel * shiftwidth()
565 let state.baseindent += s:curind * shiftwidth()
567 return state
994 " Do not keep the state. TODO: could keep the block type.
1006 " use state (continue from previous line)