diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-02-24 23:53:04 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-02-24 23:53:04 +0000 |
commit | 32466aa2e9c45ab355dbaf99a9eedf334bc2e29f (patch) | |
tree | 1644d959a04f9f8c6ea5a8fe3c79f037c6915559 /src/regexp.c | |
parent | 2a3f7eeebfa05a33cc1d8fbba66a3dff976e8dd7 (diff) | |
download | vim-git-32466aa2e9c45ab355dbaf99a9eedf334bc2e29f.tar.gz |
updated for version 7.0206v7.0206
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/regexp.c b/src/regexp.c index 69acb6987..48bad944f 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -3861,8 +3861,16 @@ regmatch(scan) } else { - top = curbuf->b_visual_start; - bot = curbuf->b_visual_end; + if (lt(curbuf->b_visual_start, curbuf->b_visual_end)) + { + top = curbuf->b_visual_start; + bot = curbuf->b_visual_end; + } + else + { + top = curbuf->b_visual_end; + bot = curbuf->b_visual_start; + } mode = curbuf->b_visual_mode; } lnum = reglnum + reg_firstlnum; @@ -5092,8 +5100,8 @@ regmatch(scan) /* Tried first position already, advance. */ if (rp->rs_state == RS_STAR_LONG) { - /* Trying for longest matc, but couldn't or didn't - * match -- back up one char. */ + /* Trying for longest match, but couldn't or + * didn't match -- back up one char. */ if (--rst->count < rst->minval) break; if (reginput == regline) @@ -5149,8 +5157,8 @@ regmatch(scan) break; } - /* If we want to continue the inner loop or didn't pop a state contine - * matching loop */ + /* If we want to continue the inner loop or didn't pop a state + * continue matching loop */ if (status == RA_CONT || rp == (regitem_T *) ((char *)regstack.ga_data + regstack.ga_len) - 1) break; |