Hi ChrisBra, cs86661 and list,

2017-4-20(Thr) 1:03:04 UTC+9 Christian Brabandt:
> Yeah, it is a bug, Vim keeps searching and finding the same position and does 
> not return.
> 
> I think this commit fixes it. (Note: The test will not finish, if run on an 
> unpatched vim)

I think below patch is better.
When `t` is not FAIL, add len to curwin->w_cursor.col simply.

diff --git a/src/normal.c b/src/normal.c
index 53bda6c..754aa5d 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4371,7 +4371,10 @@ find_decl(
            if ((pos = findmatchlimit(NULL, '}', FM_FORWARD,
                     (int)(old_pos.lnum - curwin->w_cursor.lnum + 1))) != NULL
                    && pos->lnum < old_pos.lnum)
+           {
+               curwin->w_cursor.col += len;
                continue;
+           }
        }
 
        if (t == FAIL)

--
Best regards,
Hirohito Higashi (h_east)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui