Mercurial > vim
comparison src/search.c @ 25306:078edc1821bf v8.2.3190
patch 8.2.3190: error messages are spread out
Commit: https://github.com/vim/vim/commit/e29a27f6f8eef8f00d3c2d4cd9811d81cf3026b3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 20 21:07:36 2021 +0200
patch 8.2.3190: error messages are spread out
Problem: Error messages are spread out.
Solution: Move error messages to errors.h and give them a clear name.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 20 Jul 2021 21:15:05 +0200 |
parents | 4d3c68196d05 |
children | e8e2c4d33b9b |
comparison
equal
deleted
inserted
replaced
25305:4032f1628500 | 25306:078edc1821bf |
---|---|
146 else | 146 else |
147 i = pat_use; | 147 i = pat_use; |
148 if (spats[i].pat == NULL) // pattern was never defined | 148 if (spats[i].pat == NULL) // pattern was never defined |
149 { | 149 { |
150 if (pat_use == RE_SUBST) | 150 if (pat_use == RE_SUBST) |
151 emsg(_(e_nopresub)); | 151 emsg(_(e_no_previous_substitute_regular_expression)); |
152 else | 152 else |
153 emsg(_(e_noprevre)); | 153 emsg(_(e_no_previous_regular_expression)); |
154 rc_did_emsg = TRUE; | 154 rc_did_emsg = TRUE; |
155 return FAIL; | 155 return FAIL; |
156 } | 156 } |
157 pat = spats[i].pat; | 157 pat = spats[i].pat; |
158 magic = spats[i].magic; | 158 magic = spats[i].magic; |
1321 if (spats[RE_SEARCH].pat == NULL) // no previous pattern | 1321 if (spats[RE_SEARCH].pat == NULL) // no previous pattern |
1322 { | 1322 { |
1323 searchstr = spats[RE_SUBST].pat; | 1323 searchstr = spats[RE_SUBST].pat; |
1324 if (searchstr == NULL) | 1324 if (searchstr == NULL) |
1325 { | 1325 { |
1326 emsg(_(e_noprevre)); | 1326 emsg(_(e_no_previous_regular_expression)); |
1327 retval = 0; | 1327 retval = 0; |
1328 goto end_do_search; | 1328 goto end_do_search; |
1329 } | 1329 } |
1330 } | 1330 } |
1331 else | 1331 else |