aboutsummaryrefslogtreecommitdiff
path: root/vi
diff options
context:
space:
mode:
Diffstat (limited to 'vi')
-rw-r--r--vi/v_paragraph.c11
-rw-r--r--vi/v_redraw.c1
2 files changed, 9 insertions, 3 deletions
diff --git a/vi/v_paragraph.c b/vi/v_paragraph.c
index abe8d9cf50e0..2d7f07569b79 100644
--- a/vi/v_paragraph.c
+++ b/vi/v_paragraph.c
@@ -39,15 +39,20 @@
if (p[0] == '\014') { \
if (!--cnt) \
goto found; \
+ if (pstate == P_INTEXT && !--cnt) \
+ goto found; \
continue; \
} \
if (p[0] != '.' || len < 2) \
continue; \
for (lp = VIP(sp)->ps; *lp != '\0'; lp += 2) \
if (lp[0] == p[1] && \
- (lp[1] == ' ' && len == 2 || lp[1] == p[2]) && \
- !--cnt) \
- goto found; \
+ (lp[1] == ' ' && len == 2 || lp[1] == p[2])) { \
+ if (!--cnt) \
+ goto found; \
+ if (pstate == P_INTEXT && !--cnt) \
+ goto found; \
+ } \
} while (0)
/*
diff --git a/vi/v_redraw.c b/vi/v_redraw.c
index de6ed0079701..046fcf15c1b4 100644
--- a/vi/v_redraw.c
+++ b/vi/v_redraw.c
@@ -29,5 +29,6 @@
int
v_redraw(SCR *sp, VICMD *vp)
{
+ F_SET(sp, SC_SCR_REFORMAT);
return (sp->gp->scr_refresh(sp, 1));
}