comparison src/normal.c @ 26909:aa65d1808bd0 v8.2.3983

patch 8.2.3983: error messages are spread out Commit: https://github.com/vim/vim/commit/eaaac014a01ce37c1f86dbda054c01a5c6f034e7 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 2 17:00:40 2022 +0000 patch 8.2.3983: error messages are spread out Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jan 2022 18:15:04 +0100
parents 34f1b7d6974a
children d4e61d61afd9
comparison
equal deleted inserted replaced
26908:006aa45685f9 26909:aa65d1808bd0
125 #endif 125 #endif
126 #ifdef FEAT_DND 126 #ifdef FEAT_DND
127 static void nv_drop(cmdarg_T *cap); 127 static void nv_drop(cmdarg_T *cap);
128 #endif 128 #endif
129 static void nv_cursorhold(cmdarg_T *cap); 129 static void nv_cursorhold(cmdarg_T *cap);
130
131 static char *e_noident = N_("E349: No identifier under cursor");
132 130
133 /* 131 /*
134 * Function to be called for a Normal or Visual mode command. 132 * Function to be called for a Normal or Visual mode command.
135 * The argument is a cmdarg_T. 133 * The argument is a cmdarg_T.
136 */ 134 */
1643 { 1641 {
1644 // didn't find an identifier or text 1642 // didn't find an identifier or text
1645 if ((find_type & FIND_NOERROR) == 0) 1643 if ((find_type & FIND_NOERROR) == 0)
1646 { 1644 {
1647 if (find_type & FIND_STRING) 1645 if (find_type & FIND_STRING)
1648 emsg(_("E348: No string under cursor")); 1646 emsg(_(e_no_string_under_cursor));
1649 else 1647 else
1650 emsg(_(e_noident)); 1648 emsg(_(e_no_identifier_under_cursor));
1651 } 1649 }
1652 return 0; 1650 return 0;
1653 } 1651 }
1654 ptr += col; 1652 ptr += col;
1655 *text = ptr; 1653 *text = ptr;
3681 kp = (*curbuf->b_p_kp == NUL ? p_kp : curbuf->b_p_kp); 3679 kp = (*curbuf->b_p_kp == NUL ? p_kp : curbuf->b_p_kp);
3682 kp_help = (*kp == NUL || STRCMP(kp, ":he") == 0 3680 kp_help = (*kp == NUL || STRCMP(kp, ":he") == 0
3683 || STRCMP(kp, ":help") == 0); 3681 || STRCMP(kp, ":help") == 0);
3684 if (kp_help && *skipwhite(ptr) == NUL) 3682 if (kp_help && *skipwhite(ptr) == NUL)
3685 { 3683 {
3686 emsg(_(e_noident)); // found white space only 3684 emsg(_(e_no_identifier_under_cursor)); // found white space only
3687 return; 3685 return;
3688 } 3686 }
3689 kp_ex = (*kp == ':'); 3687 kp_ex = (*kp == ':');
3690 buflen = (unsigned)(n * 2 + 30 + STRLEN(kp)); 3688 buflen = (unsigned)(n * 2 + 30 + STRLEN(kp));
3691 buf = alloc(buflen); 3689 buf = alloc(buflen);
3732 ++ptr; 3730 ++ptr;
3733 --n; 3731 --n;
3734 } 3732 }
3735 if (n == 0) 3733 if (n == 0)
3736 { 3734 {
3737 emsg(_(e_noident)); // found dashes only 3735 // found dashes only
3736 emsg(_(e_no_identifier_under_cursor));
3738 vim_free(buf); 3737 vim_free(buf);
3739 return; 3738 return;
3740 } 3739 }
3741 3740
3742 // When a count is given, turn it into a range. Is this 3741 // When a count is given, turn it into a range. Is this