From: Pasi Kallinen Date: Sat, 25 May 2013 09:36:02 +0000 (+0300) Subject: Allow repeat prefix for move paragraph forward/backward command X-Git-Tag: v1.6.1-roc-dev~62 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=389c137df9327075ae9e11cab33ae4c6649ab827;p=dgamelaunch Allow repeat prefix for move paragraph forward/backward command --- diff --git a/virus.c b/virus.c index ab411ce..6fa77ae 100644 --- a/virus.c +++ b/virus.c @@ -1149,16 +1149,20 @@ key_cmd_mode: psbs ("%s", msg); break; case '{': // {- move backward paragraph - q = char_search (dot, (Byte *) "\n\n", BACK, FULL); - if (q != NULL) { // found blank line - dot = next_line (q); // move to next blank line - } + do { + q = char_search(dot, (Byte *) "\n\n", BACK, FULL); + if (q != NULL) { // found blank line + dot = next_line(q); // move to next blank line + } + } while (cmdcnt-- > 1); break; case '}': // }- move forward paragraph - q = char_search (dot, (Byte *) "\n\n", FORWARD, FULL); - if (q != NULL) { // found blank line - dot = next_line (q); // move to next blank line - } + do { + q = char_search(dot, (Byte *) "\n\n", FORWARD, FULL); + if (q != NULL) { // found blank line + dot = next_line(q); // move to next blank line + } + } while (cmdcnt-- > 1); break; #endif /* BB_FEATURE_VI_SEARCH */ case '0': // 0- goto begining of line