Mercurial > vim
comparison src/help.c @ 26853:806f31579357 v8.2.3955
patch 8.2.3955: error messages are spread out
Commit: https://github.com/vim/vim/commit/eb822a280cf4706f7e67319ced1cdf3243b27e20
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 31 15:09:27 2021 +0000
patch 8.2.3955: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 31 Dec 2021 16:15:03 +0100 |
parents | 35d000f3d591 |
children | 2aeea8611342 |
comparison
equal
deleted
inserted
replaced
26852:f75fd683d54b | 26853:806f31579357 |
---|---|
105 #ifdef FEAT_MULTI_LANG | 105 #ifdef FEAT_MULTI_LANG |
106 if (lang != NULL) | 106 if (lang != NULL) |
107 semsg(_("E661: Sorry, no '%s' help for %s"), lang, arg); | 107 semsg(_("E661: Sorry, no '%s' help for %s"), lang, arg); |
108 else | 108 else |
109 #endif | 109 #endif |
110 semsg(_("E149: Sorry, no help for %s"), arg); | 110 semsg(_(e_sorry_no_help_for_str), arg); |
111 if (n != FAIL) | 111 if (n != FAIL) |
112 FreeWild(num_matches, matches); | 112 FreeWild(num_matches, matches); |
113 return; | 113 return; |
114 } | 114 } |
115 | 115 |
980 if (gen_expand_wildcards(1, &NameBuff, &filecount, &files, | 980 if (gen_expand_wildcards(1, &NameBuff, &filecount, &files, |
981 EW_FILE|EW_SILENT) == FAIL | 981 EW_FILE|EW_SILENT) == FAIL |
982 || filecount == 0) | 982 || filecount == 0) |
983 { | 983 { |
984 if (!got_int) | 984 if (!got_int) |
985 semsg(_("E151: No match: %s"), NameBuff); | 985 semsg(_(e_no_match_str), NameBuff); |
986 return; | 986 return; |
987 } | 987 } |
988 | 988 |
989 // Open the tags file for writing. | 989 // Open the tags file for writing. |
990 // Do this before scanning through all the files. | 990 // Do this before scanning through all the files. |
993 STRCAT(NameBuff, tagfname); | 993 STRCAT(NameBuff, tagfname); |
994 fd_tags = mch_fopen((char *)NameBuff, "w"); | 994 fd_tags = mch_fopen((char *)NameBuff, "w"); |
995 if (fd_tags == NULL) | 995 if (fd_tags == NULL) |
996 { | 996 { |
997 if (!ignore_writeerr) | 997 if (!ignore_writeerr) |
998 semsg(_("E152: Cannot open %s for writing"), NameBuff); | 998 semsg(_(e_cannot_open_str_for_writing), NameBuff); |
999 FreeWild(filecount, files); | 999 FreeWild(filecount, files); |
1000 return; | 1000 return; |
1001 } | 1001 } |
1002 | 1002 |
1003 // If using the "++t" argument or generating tags for "$VIMRUNTIME/doc" | 1003 // If using the "++t" argument or generating tags for "$VIMRUNTIME/doc" |
1026 for (fi = 0; fi < filecount && !got_int; ++fi) | 1026 for (fi = 0; fi < filecount && !got_int; ++fi) |
1027 { | 1027 { |
1028 fd = mch_fopen((char *)files[fi], "r"); | 1028 fd = mch_fopen((char *)files[fi], "r"); |
1029 if (fd == NULL) | 1029 if (fd == NULL) |
1030 { | 1030 { |
1031 semsg(_("E153: Unable to open %s for reading"), files[fi]); | 1031 semsg(_(e_unable_to_open_str_for_reading), files[fi]); |
1032 continue; | 1032 continue; |
1033 } | 1033 } |
1034 fname = files[fi] + dirlen + 1; | 1034 fname = files[fi] + dirlen + 1; |
1035 | 1035 |
1036 firstline = TRUE; | 1036 firstline = TRUE; |
1134 { | 1134 { |
1135 if (*p2 == '\t') | 1135 if (*p2 == '\t') |
1136 { | 1136 { |
1137 *p2 = NUL; | 1137 *p2 = NUL; |
1138 vim_snprintf((char *)NameBuff, MAXPATHL, | 1138 vim_snprintf((char *)NameBuff, MAXPATHL, |
1139 _("E154: Duplicate tag \"%s\" in file %s/%s"), | 1139 _(e_duplicate_tag_str_in_file_str_str), |
1140 ((char_u **)ga.ga_data)[i], dir, p2 + 1); | 1140 ((char_u **)ga.ga_data)[i], dir, p2 + 1); |
1141 emsg((char *)NameBuff); | 1141 emsg((char *)NameBuff); |
1142 *p2 = '\t'; | 1142 *p2 = '\t'; |
1143 break; | 1143 break; |
1144 } | 1144 } |
1314 ExpandInit(&xpc); | 1314 ExpandInit(&xpc); |
1315 xpc.xp_context = EXPAND_DIRECTORIES; | 1315 xpc.xp_context = EXPAND_DIRECTORIES; |
1316 dirname = ExpandOne(&xpc, eap->arg, NULL, | 1316 dirname = ExpandOne(&xpc, eap->arg, NULL, |
1317 WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE); | 1317 WILD_LIST_NOTFOUND|WILD_SILENT, WILD_EXPAND_FREE); |
1318 if (dirname == NULL || !mch_isdir(dirname)) | 1318 if (dirname == NULL || !mch_isdir(dirname)) |
1319 semsg(_("E150: Not a directory: %s"), eap->arg); | 1319 semsg(_(e_not_a_directory_str), eap->arg); |
1320 else | 1320 else |
1321 do_helptags(dirname, add_help_tags, FALSE); | 1321 do_helptags(dirname, add_help_tags, FALSE); |
1322 vim_free(dirname); | 1322 vim_free(dirname); |
1323 } | 1323 } |
1324 } | 1324 } |