Mercurial > vim
comparison src/ex_docmd.c @ 19892:5feb426d2ea1 v8.2.0502
patch 8.2.0502: Vim9: some code is not tested
Commit: https://github.com/vim/vim/commit/e8c4abbbd711af8fd3ed85ea69e9ac3d63a0d879
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 2 21:13:25 2020 +0200
patch 8.2.0502: Vim9: some code is not tested
Problem: Vim9: some code is not tested.
Solution: Add more tests. Fix uncovered problems.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 02 Apr 2020 21:15:04 +0200 |
parents | d64f403289db |
children | aadd1cae2ff5 |
comparison
equal
deleted
inserted
replaced
19891:e1168788aa04 | 19892:5feb426d2ea1 |
---|---|
3661 cmd = NULL; | 3661 cmd = NULL; |
3662 goto error; | 3662 goto error; |
3663 } | 3663 } |
3664 if (skip) // skip "/pat/" | 3664 if (skip) // skip "/pat/" |
3665 { | 3665 { |
3666 cmd = skip_regexp(cmd, c, (int)p_magic, NULL); | 3666 cmd = skip_regexp(cmd, c, (int)p_magic); |
3667 if (*cmd == c) | 3667 if (*cmd == c) |
3668 ++cmd; | 3668 ++cmd; |
3669 } | 3669 } |
3670 else | 3670 else |
3671 { | 3671 { |
6121 beginline(BL_SOL | BL_FIX); | 6121 beginline(BL_SOL | BL_FIX); |
6122 if (*eap->arg == '/') | 6122 if (*eap->arg == '/') |
6123 { | 6123 { |
6124 // ":open /pattern/": put cursor in column found with pattern | 6124 // ":open /pattern/": put cursor in column found with pattern |
6125 ++eap->arg; | 6125 ++eap->arg; |
6126 p = skip_regexp(eap->arg, '/', p_magic, NULL); | 6126 p = skip_regexp(eap->arg, '/', p_magic); |
6127 *p = NUL; | 6127 *p = NUL; |
6128 regmatch.regprog = vim_regcomp(eap->arg, p_magic ? RE_MAGIC : 0); | 6128 regmatch.regprog = vim_regcomp(eap->arg, p_magic ? RE_MAGIC : 0); |
6129 if (regmatch.regprog != NULL) | 6129 if (regmatch.regprog != NULL) |
6130 { | 6130 { |
6131 regmatch.rm_ic = p_ic; | 6131 regmatch.rm_ic = p_ic; |
7855 } | 7855 } |
7856 if (*eap->arg == '/') // Match regexp, not just whole words | 7856 if (*eap->arg == '/') // Match regexp, not just whole words |
7857 { | 7857 { |
7858 whole = FALSE; | 7858 whole = FALSE; |
7859 ++eap->arg; | 7859 ++eap->arg; |
7860 p = skip_regexp(eap->arg, '/', p_magic, NULL); | 7860 p = skip_regexp(eap->arg, '/', p_magic); |
7861 if (*p) | 7861 if (*p) |
7862 { | 7862 { |
7863 *p++ = NUL; | 7863 *p++ = NUL; |
7864 p = skipwhite(p); | 7864 p = skipwhite(p); |
7865 | 7865 |