diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-21 19:35:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-21 19:35:30 +0100 |
commit | fa6ed5f7594b6da25d49f10347e4975329a59a08 (patch) | |
tree | 5626128b9d298a3c4d5f03dcc6ff6af372b3288b /src/nvim/regexp.c | |
parent | c5631338b16b2a21e0abbbc54494f660f6e7fb76 (diff) | |
parent | ea538f8799884db0f04a3233befffc6bd8c4e3f8 (diff) | |
download | rneovim-fa6ed5f7594b6da25d49f10347e4975329a59a08.tar.gz rneovim-fa6ed5f7594b6da25d49f10347e4975329a59a08.tar.bz2 rneovim-fa6ed5f7594b6da25d49f10347e4975329a59a08.zip |
Merge #9769 from janlazo/vim-8.1.1025
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index ab1a7c7b3e..c602e7df0f 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -6963,10 +6963,11 @@ char_u *reg_submatch(int no) return NULL; } - s = reg_getline_submatch(lnum) + rsm.sm_mmatch->startpos[no].col; + s = reg_getline_submatch(lnum); if (s == NULL) { // anti-crash check, cannot happen? break; } + s += rsm.sm_mmatch->startpos[no].col; if (rsm.sm_mmatch->endpos[no].lnum == lnum) { // Within one line: take form start to end col. len = rsm.sm_mmatch->endpos[no].col - rsm.sm_mmatch->startpos[no].col; |