Mercurial > vim
comparison src/regexp.c @ 4732:0798b096bab3 v7.3.1113
updated for version 7.3.1113
Problem: New regexp engine: \%'m not supported.
Solution: Implement \%'m. Add tests.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 04 Jun 2013 21:27:38 +0200 |
parents | 749e2b2755d5 |
children | a62695305e03 |
comparison
equal
deleted
inserted
replaced
4731:7c1a130ad754 | 4732:0798b096bab3 |
---|---|
4399 || ((colnr_T)(reginput - regline) != reg_win->w_cursor.col)) | 4399 || ((colnr_T)(reginput - regline) != reg_win->w_cursor.col)) |
4400 status = RA_NOMATCH; | 4400 status = RA_NOMATCH; |
4401 break; | 4401 break; |
4402 | 4402 |
4403 case RE_MARK: | 4403 case RE_MARK: |
4404 /* Compare the mark position to the match position. NOTE: Always | 4404 /* Compare the mark position to the match position. */ |
4405 * uses the current buffer. */ | |
4406 { | 4405 { |
4407 int mark = OPERAND(scan)[0]; | 4406 int mark = OPERAND(scan)[0]; |
4408 int cmp = OPERAND(scan)[1]; | 4407 int cmp = OPERAND(scan)[1]; |
4409 pos_T *pos; | 4408 pos_T *pos; |
4410 | 4409 |
4411 pos = getmark_buf(reg_buf, mark, FALSE); | 4410 pos = getmark_buf(reg_buf, mark, FALSE); |
4412 if (pos == NULL /* mark doesn't exist */ | 4411 if (pos == NULL /* mark doesn't exist */ |
4413 || pos->lnum <= 0 /* mark isn't set (in curbuf) */ | 4412 || pos->lnum <= 0 /* mark isn't set in reg_buf */ |
4414 || (pos->lnum == reglnum + reg_firstlnum | 4413 || (pos->lnum == reglnum + reg_firstlnum |
4415 ? (pos->col == (colnr_T)(reginput - regline) | 4414 ? (pos->col == (colnr_T)(reginput - regline) |
4416 ? (cmp == '<' || cmp == '>') | 4415 ? (cmp == '<' || cmp == '>') |
4417 : (pos->col < (colnr_T)(reginput - regline) | 4416 : (pos->col < (colnr_T)(reginput - regline) |
4418 ? cmp != '>' | 4417 ? cmp != '>' |