aboutsummaryrefslogtreecommitdiffstats
path: root/vi/vs_relative.c
diff options
context:
space:
mode:
Diffstat (limited to 'vi/vs_relative.c')
-rw-r--r--vi/vs_relative.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vi/vs_relative.c b/vi/vs_relative.c
index 5df8c3c3f22d..353dcbe9d572 100644
--- a/vi/vs_relative.c
+++ b/vi/vs_relative.c
@@ -142,15 +142,16 @@ done: if (diffp != NULL) /* XXX */
* last column of the screen. Otherwise, display the rest of the
* character in the next screen.
*/
-#define TAB_RESET { \
+#define TAB_RESET do { \
curoff += chlen; \
- if (!leftright && curoff >= sp->cols) \
+ if (!leftright && curoff >= sp->cols) { \
if (ch == '\t') { \
curoff = 0; \
scno -= scno % sp->cols; \
} else \
curoff -= sp->cols; \
-}
+ } \
+} while (0)
if (cnop == NULL)
while (len--) {
chlen = CHLEN(curoff);