Lines Matching full:vp
65 VICMD cmd = { 0 }, *vp; in vi() local
74 vp = &cmd; in vi()
77 F_SET(vp, VM_RCM_SET); in vi()
104 if (F_ISSET(vp, VM_RCM_SET | VM_RCM_SETFNB | VM_RCM_SETNNB)) { in vi()
128 vp->kp = &vikeys[':']; in vi()
133 memset(vp, 0, sizeof(VICMD)); in vi()
148 switch (v_cmd(sp, DOT, vp, NULL, &comcount, &mapped)) { in vi()
164 if (F_ISSET(vp->kp, V_SECURE) && O_ISSET(sp, O_SECURE)) { in vi()
165 ex_emsg(sp, KEY_NAME(sp, vp->key), EXM_SECURE); in vi()
174 if (F_ISSET(vp, VC_ISDOT) && comcount) in vi()
178 F_SET(vp, vp->kp->flags); in vi()
181 if (F_ISSET(vp, V_ABS | V_ABS_C | V_ABS_L)) { in vi()
192 vp->m_start.lno = vp->m_stop.lno = vp->m_final.lno = sp->lno; in vi()
193 vp->m_start.cno = vp->m_stop.cno = vp->m_final.cno = sp->cno; in vi()
199 if (F_ISSET(vp, V_MOTION) && in vi()
200 v_motion(sp, DOTMOTION, vp, &mapped)) { in vi()
216 if (F_ISSET(vp, VC_C1SET) && F_ISSET(vp, VM_LMODE)) in vi()
217 vp->m_stop.lno += vp->count - 1; in vi()
223 v_comlog(sp, vp); in vi()
226 ex_continue: if (vp->kp->func(sp, vp)) in vi()
275 if (F_ISSET(vp, V_DOT) && !mapped) { in vi()
284 if (F_ISSET(vp, VC_C1RESET)) in vi()
310 switch (F_ISSET(vp, VM_RCM_MASK)) { in vi()
315 vp->m_final.cno = vs_rcm(sp, in vi()
316 vp->m_final.lno, F_ISSET(vip, VIP_RCM_LAST)); in vi()
322 vp->m_final.cno = 0; in vi()
325 if (nonblank(sp, vp->m_final.lno, &vp->m_final.cno)) in vi()
333 sp->lno = vp->m_final.lno; in vi()
334 sp->cno = vp->m_final.cno; in vi()
340 if ((F_ISSET(vp, V_ABS) || in vi()
341 (F_ISSET(vp, V_ABS_L) && sp->lno != abs.lno) || in vi()
342 (F_ISSET(vp, V_ABS_C) && in vi()
450 VICMD *vp, in v_cmd() argument
479 vp->ev = ev; in v_cmd()
498 KEY(vp->buffer, 0); in v_cmd()
499 F_SET(vp, VC_BUFFER); in v_cmd()
509 if (v_count(sp, key, &vp->count)) in v_cmd()
511 F_SET(vp, VC_C1SET); in v_cmd()
521 if (F_ISSET(vp, VC_BUFFER)) { in v_cmd()
529 KEY(vp->buffer, 0); in v_cmd()
530 F_SET(vp, VC_BUFFER); in v_cmd()
541 kp = &vikeys[vp->key = key]; in v_cmd()
547 if (vp->key == 'D' && F_ISSET(vp, VC_C1SET)) { in v_cmd()
549 vp->count = 0; in v_cmd()
550 F_CLR(vp, VC_C1SET); in v_cmd()
554 if (kp->func == NULL && (kp = v_alias(sp, vp, kp)) == NULL) in v_cmd()
561 vp->kp = kp; in v_cmd()
589 vp->kp = &vikeys['u']; in v_cmd()
590 F_SET(vp, VC_ISDOT); in v_cmd()
601 if (F_ISSET(vp, VC_C1SET)) { in v_cmd()
603 dp->count = vp->count; in v_cmd()
605 if (F_ISSET(vp, VC_BUFFER)) in v_cmd()
606 dp->buffer = vp->buffer; in v_cmd()
608 *vp = *dp; in v_cmd()
616 if (F_ISSET(vp, VC_C1SET) && !LF_ISSET(V_CNT)) in v_cmd()
622 if (!LF_ISSET(V_OBUF) && F_ISSET(vp, VC_BUFFER)) in v_cmd()
627 KEY(vp->buffer, 0); in v_cmd()
628 F_SET(vp, VC_BUFFER); in v_cmd()
637 if (vp->key == '[' || vp->key == ']' || vp->key == 'Z') { in v_cmd()
652 if (vp->key != key) { in v_cmd()
664 if (vp->key == 'z') { in v_cmd()
665 KEY(vp->character, 0); in v_cmd()
666 if (ISDIGIT(vp->character)) { in v_cmd()
667 if (v_count(sp, vp->character, &vp->count2)) in v_cmd()
669 F_SET(vp, VC_C2SET); in v_cmd()
670 KEY(vp->character, 0); in v_cmd()
686 KEY(vp->character, 0); in v_cmd()
716 VICMD *vp, in v_motion() argument
730 if (F_ISSET(vp, VC_ISDOT)) { in v_motion()
736 if (v_cmd(sp, NULL, &motion, vp, ¬used, mappedp) != GC_OK) in v_motion()
747 if (F_ISSET(vp, VC_C1SET)) { in v_motion()
748 motion.count *= vp->count; in v_motion()
756 F_CLR(vp, VC_C1SET); in v_motion()
757 F_SET(vp, VC_C1RESET); in v_motion()
766 if (vp->key == motion.key) { in v_motion()
767 F_SET(vp, VM_LDOUBLE | VM_LMODE); in v_motion()
770 vp->m_start.lno = sp->lno; in v_motion()
771 vp->m_start.cno = 0; in v_motion()
780 vp->m_stop.lno = sp->lno + motion.count - 1; in v_motion()
781 if (db_get(sp, vp->m_stop.lno, 0, NULL, &len)) { in v_motion()
782 if (vp->m_stop.lno != 1 || in v_motion()
783 (vp->key != 'c' && vp->key != '!')) { in v_motion()
787 vp->m_stop.cno = 0; in v_motion()
789 vp->m_stop.cno = len ? len - 1 : 0; in v_motion()
796 motion.rkp = vp->kp; in v_motion()
803 if (vp->kp == &tmotion) { in v_motion()
805 vp->kp = &vikeys['y']; in v_motion()
812 * the vp structure if necessary. This means that the motion in v_motion()
824 flags = F_ISSET(vp, VM_RCM_MASK); in v_motion()
829 F_CLR(vp, VM_RCM_MASK); in v_motion()
853 if (!db_exist(sp, vp->m_stop.lno)) { in v_motion()
854 if (vp->m_stop.lno != 1 || in v_motion()
855 (vp->key != 'c' && vp->key != '!')) { in v_motion()
859 vp->m_stop.cno = 0; in v_motion()
867 vp->kp = &tmotion; in v_motion()
876 F_SET(vp, F_ISSET(&motion, VM_COMMASK | VM_RCM_MASK)); in v_motion()
882 if (!F_ISSET(vp, VM_RCM_MASK)) in v_motion()
883 F_SET(vp, flags); in v_motion()
890 vp->rkp = motion.kp; in v_motion()
901 vp->m_start = motion.m_stop; in v_motion()
902 vp->m_stop = motion.m_start; in v_motion()
904 vp->m_start = motion.m_start; in v_motion()
905 vp->m_stop = motion.m_stop; in v_motion()
907 vp->m_final = motion.m_final; in v_motion()
915 if (F_ISSET(vp->kp, V_DOT)) { in v_motion()
1091 VICMD *vp, in v_alias() argument
1096 switch (vp->key) { in v_alias()
1099 vp->key = 'c'; in v_alias()
1103 vp->key = 'd'; in v_alias()
1107 vp->key = 'c'; in v_alias()
1111 vp->key = 'y'; in v_alias()
1117 NULL, &push, 1, CH_NOMAP | CH_QUOTED) ? NULL : &vikeys[vp->key]); in v_alias()
1229 VICMD *vp) in v_comlog() argument
1231 TRACE(sp, "vcmd: "WC, vp->key); in v_comlog()
1232 if (F_ISSET(vp, VC_BUFFER)) in v_comlog()
1233 TRACE(sp, " buffer: "WC, vp->buffer); in v_comlog()
1234 if (F_ISSET(vp, VC_C1SET)) in v_comlog()
1235 TRACE(sp, " c1: %lu", vp->count); in v_comlog()
1236 if (F_ISSET(vp, VC_C2SET)) in v_comlog()
1237 TRACE(sp, " c2: %lu", vp->count2); in v_comlog()
1238 TRACE(sp, " flags: 0x%x\n", vp->flags); in v_comlog()