Mercurial > vim
comparison src/register.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 | f397a21b3e4c |
children | ac88cd21ae88 |
comparison
equal
deleted
inserted
replaced
25305:4032f1628500 | 25306:078edc1821bf |
---|---|
592 // use last command line | 592 // use last command line |
593 if (regname == ':') | 593 if (regname == ':') |
594 { | 594 { |
595 if (last_cmdline == NULL) | 595 if (last_cmdline == NULL) |
596 { | 596 { |
597 emsg(_(e_nolastcmd)); | 597 emsg(_(e_no_previous_command_line)); |
598 return FAIL; | 598 return FAIL; |
599 } | 599 } |
600 // don't keep the cmdline containing @: | 600 // don't keep the cmdline containing @: |
601 VIM_CLEAR(new_last_cmdline); | 601 VIM_CLEAR(new_last_cmdline); |
602 // Escape all control characters with a CTRL-V | 602 // Escape all control characters with a CTRL-V |
630 else if (regname == '.') // use last inserted text | 630 else if (regname == '.') // use last inserted text |
631 { | 631 { |
632 p = get_last_insert_save(); | 632 p = get_last_insert_save(); |
633 if (p == NULL) | 633 if (p == NULL) |
634 { | 634 { |
635 emsg(_(e_noinstext)); | 635 emsg(_(e_no_inserted_text_yet)); |
636 return FAIL; | 636 return FAIL; |
637 } | 637 } |
638 retval = put_in_typebuf(p, FALSE, colon, silent); | 638 retval = put_in_typebuf(p, FALSE, colon, silent); |
639 vim_free(p); | 639 vim_free(p); |
640 } | 640 } |
865 return TRUE; | 865 return TRUE; |
866 #endif | 866 #endif |
867 | 867 |
868 case ':': // last command line | 868 case ':': // last command line |
869 if (last_cmdline == NULL && errmsg) | 869 if (last_cmdline == NULL && errmsg) |
870 emsg(_(e_nolastcmd)); | 870 emsg(_(e_no_previous_command_line)); |
871 *argp = last_cmdline; | 871 *argp = last_cmdline; |
872 return TRUE; | 872 return TRUE; |
873 | 873 |
874 case '/': // last search-pattern | 874 case '/': // last search-pattern |
875 if (last_search_pat() == NULL && errmsg) | 875 if (last_search_pat() == NULL && errmsg) |
876 emsg(_(e_noprevre)); | 876 emsg(_(e_no_previous_regular_expression)); |
877 *argp = last_search_pat(); | 877 *argp = last_search_pat(); |
878 return TRUE; | 878 return TRUE; |
879 | 879 |
880 case '.': // last inserted text | 880 case '.': // last inserted text |
881 *argp = get_last_insert_save(); | 881 *argp = get_last_insert_save(); |
882 *allocated = TRUE; | 882 *allocated = TRUE; |
883 if (*argp == NULL && errmsg) | 883 if (*argp == NULL && errmsg) |
884 emsg(_(e_noinstext)); | 884 emsg(_(e_no_inserted_text_yet)); |
885 return TRUE; | 885 return TRUE; |
886 | 886 |
887 #ifdef FEAT_SEARCHPATH | 887 #ifdef FEAT_SEARCHPATH |
888 case Ctrl_F: // Filename under cursor | 888 case Ctrl_F: // Filename under cursor |
889 case Ctrl_P: // Path under cursor, expand via "path" | 889 case Ctrl_P: // Path under cursor, expand via "path" |