aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 4e1a2390f..e3e0f4b44 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3513,16 +3513,15 @@ static void do_cmd(int c)
3513 } while (--cmdcnt > 0); 3513 } while (--cmdcnt > 0);
3514 break; 3514 break;
3515 case '{': // {- move backward paragraph 3515 case '{': // {- move backward paragraph
3516 q = char_search(dot, "\n\n", ((unsigned)BACK << 1) | FULL);
3517 if (q != NULL) { // found blank line
3518 dot = next_line(q); // move to next blank line
3519 }
3520 break;
3521 case '}': // }- move forward paragraph 3516 case '}': // }- move forward paragraph
3522 q = char_search(dot, "\n\n", (FORWARD << 1) | FULL); 3517 do {
3523 if (q != NULL) { // found blank line 3518 q = char_search(dot, "\n\n", c == '{' ?
3524 dot = next_line(q); // move to next blank line 3519 ((unsigned)BACK << 1) | FULL :
3525 } 3520 (FORWARD << 1) | FULL);
3521 if (q != NULL) { // found blank line
3522 dot = next_line(q); // move to next blank line
3523 }
3524 } while (--cmdcnt > 0);
3526 break; 3525 break;
3527#endif /* FEATURE_VI_SEARCH */ 3526#endif /* FEATURE_VI_SEARCH */
3528 case '0': // 0- goto beginning of line 3527 case '0': // 0- goto beginning of line