Lines Matching full:vp
66 v_lgoto(SCR *sp, VICMD *vp) in v_lgoto() argument
70 if (F_ISSET(vp, VC_C1SET)) { in v_lgoto()
71 if (!db_exist(sp, vp->count)) { in v_lgoto()
76 if (vp->count == 1) { in v_lgoto()
82 v_eof(sp, &vp->m_start); in v_lgoto()
85 vp->m_stop.lno = vp->count; in v_lgoto()
89 vp->m_stop.lno = nlines ? nlines : 1; in v_lgoto()
91 goto_adjust(vp); in v_lgoto()
103 v_home(SCR *sp, VICMD *vp) in v_home() argument
105 if (vs_sm_position(sp, &vp->m_stop, in v_home()
106 F_ISSET(vp, VC_C1SET) ? vp->count - 1 : 0, P_TOP)) in v_home()
108 goto_adjust(vp); in v_home()
120 v_middle(SCR *sp, VICMD *vp) in v_middle() argument
127 if (vs_sm_position(sp, &vp->m_stop, 0, P_MIDDLE)) in v_middle()
129 goto_adjust(vp); in v_middle()
141 v_bottom(SCR *sp, VICMD *vp) in v_bottom() argument
143 if (vs_sm_position(sp, &vp->m_stop, in v_bottom()
144 F_ISSET(vp, VC_C1SET) ? vp->count - 1 : 0, P_BOTTOM)) in v_bottom()
146 goto_adjust(vp); in v_bottom()
151 goto_adjust(VICMD *vp) in goto_adjust() argument
154 vp->m_final = vp->m_stop; in goto_adjust()
176 if (ISMOTION(vp)) { in goto_adjust()
177 F_CLR(vp, VM_RCM_MASK); in goto_adjust()
178 F_SET(vp, VM_RCM_SETFNB); in goto_adjust()
188 if (vp->m_stop.lno < vp->m_start.lno || in goto_adjust()
189 (vp->m_stop.lno == vp->m_start.lno && in goto_adjust()
190 vp->m_stop.cno < vp->m_start.cno)) { in goto_adjust()
191 if (ISCMD(vp->rkp, 'y') && vp->m_stop.lno == vp->m_start.lno) in goto_adjust()
192 vp->m_final = vp->m_start; in goto_adjust()
194 vp->m_final = vp->m_start; in goto_adjust()
204 v_up(SCR *sp, VICMD *vp) in v_up() argument
208 lno = F_ISSET(vp, VC_C1SET) ? vp->count : 1; in v_up()
209 if (vp->m_start.lno <= lno) { in v_up()
210 v_sof(sp, &vp->m_start); in v_up()
213 vp->m_stop.lno = vp->m_start.lno - lno; in v_up()
214 vp->m_final = vp->m_stop; in v_up()
226 v_cr(SCR *sp, VICMD *vp) in v_cr() argument
234 return (sscr_exec(sp, vp->m_start.lno)); in v_cr()
237 return (v_down(sp, vp)); in v_cr()
247 v_down(SCR *sp, VICMD *vp) in v_down() argument
251 lno = vp->m_start.lno + (F_ISSET(vp, VC_C1SET) ? vp->count : 1); in v_down()
253 v_eof(sp, &vp->m_start); in v_down()
256 vp->m_stop.lno = lno; in v_down()
257 vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; in v_down()
268 v_hpageup(SCR *sp, VICMD *vp) in v_hpageup() argument
277 if (F_ISSET(vp, VC_C1SET)) in v_hpageup()
278 sp->defscroll = vp->count; in v_hpageup()
279 if (vs_sm_scroll(sp, &vp->m_stop, sp->defscroll, CNTRL_U)) in v_hpageup()
281 vp->m_final = vp->m_stop; in v_hpageup()
292 v_hpagedown(SCR *sp, VICMD *vp) in v_hpagedown() argument
301 if (F_ISSET(vp, VC_C1SET)) in v_hpagedown()
302 sp->defscroll = vp->count; in v_hpagedown()
303 if (vs_sm_scroll(sp, &vp->m_stop, sp->defscroll, CNTRL_D)) in v_hpagedown()
305 vp->m_final = vp->m_stop; in v_hpagedown()
320 v_pagedown(SCR *sp, VICMD *vp) in v_pagedown() argument
345 offset = (F_ISSET(vp, VC_C1SET) ? vp->count : 1) * (IS_SPLIT(sp) ? in v_pagedown()
348 if (vs_sm_scroll(sp, &vp->m_stop, offset, CNTRL_F)) in v_pagedown()
350 vp->m_final = vp->m_stop; in v_pagedown()
366 v_pageup(SCR *sp, VICMD *vp) in v_pageup() argument
396 offset = (F_ISSET(vp, VC_C1SET) ? vp->count : 1) * (IS_SPLIT(sp) ? in v_pageup()
399 if (vs_sm_scroll(sp, &vp->m_stop, offset, CNTRL_B)) in v_pageup()
401 vp->m_final = vp->m_stop; in v_pageup()
412 v_lineup(SCR *sp, VICMD *vp) in v_lineup() argument
419 &vp->m_stop, F_ISSET(vp, VC_C1SET) ? vp->count : 1, CNTRL_Y)) in v_lineup()
421 vp->m_final = vp->m_stop; in v_lineup()
432 v_linedown(SCR *sp, VICMD *vp) in v_linedown() argument
439 &vp->m_stop, F_ISSET(vp, VC_C1SET) ? vp->count : 1, CNTRL_E)) in v_linedown()
441 vp->m_final = vp->m_stop; in v_linedown()