Mercurial > vim
comparison src/screen.c @ 26865:bce848ec8b1b v8.2.3961
patch 8.2.3961: error messages are spread out
Commit: https://github.com/vim/vim/commit/436b5adc9770a2568209dd5ab1f98bd1afc91898
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 31 22:49:24 2021 +0000
patch 8.2.3961: 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 | Sat, 01 Jan 2022 00:00:04 +0100 |
parents | fc859aea8cec |
children | fb4c30606b4a |
comparison
equal
deleted
inserted
replaced
26864:eb95ad159bce | 26865:bce848ec8b1b |
---|---|
4913 { | 4913 { |
4914 c2 = c3 = 0; | 4914 c2 = c3 = 0; |
4915 s = p + len + 1; | 4915 s = p + len + 1; |
4916 c1 = get_encoded_char_adv(&s); | 4916 c1 = get_encoded_char_adv(&s); |
4917 if (char2cells(c1) > 1) | 4917 if (char2cells(c1) > 1) |
4918 return e_invarg; | 4918 return e_invalid_argument; |
4919 if (tab[i].cp == &lcs_chars.tab2) | 4919 if (tab[i].cp == &lcs_chars.tab2) |
4920 { | 4920 { |
4921 if (*s == NUL) | 4921 if (*s == NUL) |
4922 return e_invarg; | 4922 return e_invalid_argument; |
4923 c2 = get_encoded_char_adv(&s); | 4923 c2 = get_encoded_char_adv(&s); |
4924 if (char2cells(c2) > 1) | 4924 if (char2cells(c2) > 1) |
4925 return e_invarg; | 4925 return e_invalid_argument; |
4926 if (!(*s == ',' || *s == NUL)) | 4926 if (!(*s == ',' || *s == NUL)) |
4927 { | 4927 { |
4928 c3 = get_encoded_char_adv(&s); | 4928 c3 = get_encoded_char_adv(&s); |
4929 if (char2cells(c3) > 1) | 4929 if (char2cells(c3) > 1) |
4930 return e_invarg; | 4930 return e_invalid_argument; |
4931 } | 4931 } |
4932 } | 4932 } |
4933 | 4933 |
4934 if (*s == ',' || *s == NUL) | 4934 if (*s == ',' || *s == NUL) |
4935 { | 4935 { |
4967 multispace_len = 0; | 4967 multispace_len = 0; |
4968 while (*s != NUL && *s != ',') | 4968 while (*s != NUL && *s != ',') |
4969 { | 4969 { |
4970 c1 = get_encoded_char_adv(&s); | 4970 c1 = get_encoded_char_adv(&s); |
4971 if (char2cells(c1) > 1) | 4971 if (char2cells(c1) > 1) |
4972 return e_invarg; | 4972 return e_invalid_argument; |
4973 ++multispace_len; | 4973 ++multispace_len; |
4974 } | 4974 } |
4975 if (multispace_len == 0) | 4975 if (multispace_len == 0) |
4976 // lcs-multispace cannot be an empty string | 4976 // lcs-multispace cannot be an empty string |
4977 return e_invarg; | 4977 return e_invalid_argument; |
4978 p = s; | 4978 p = s; |
4979 } | 4979 } |
4980 else | 4980 else |
4981 { | 4981 { |
4982 int multispace_pos = 0; | 4982 int multispace_pos = 0; |
4989 } | 4989 } |
4990 p = s; | 4990 p = s; |
4991 } | 4991 } |
4992 } | 4992 } |
4993 else | 4993 else |
4994 return e_invarg; | 4994 return e_invalid_argument; |
4995 } | 4995 } |
4996 | 4996 |
4997 if (*p == ',') | 4997 if (*p == ',') |
4998 ++p; | 4998 ++p; |
4999 } | 4999 } |