Mercurial > vim
comparison src/ex_getln.c @ 849:eac1cd7f1eff
updated for version 7.0f04
author | vimboss |
---|---|
date | Fri, 28 Apr 2006 22:38:25 +0000 |
parents | 8e5830943bff |
children | 8cd729851562 |
comparison
equal
deleted
inserted
replaced
848:f4d8553715f7 | 849:eac1cd7f1eff |
---|---|
2839 { | 2839 { |
2840 ccline = prev_ccline; | 2840 ccline = prev_ccline; |
2841 prev_ccline = *ccp; | 2841 prev_ccline = *ccp; |
2842 } | 2842 } |
2843 | 2843 |
2844 #if defined(FEAT_EVAL) || defined(PROTO) | |
2845 /* | |
2846 * Save the command line into allocated memory. Returns a pointer to be | |
2847 * passed to restore_cmdline_alloc() later. | |
2848 * Returns NULL when failed. | |
2849 */ | |
2850 char_u * | |
2851 save_cmdline_alloc() | |
2852 { | |
2853 struct cmdline_info *p; | |
2854 | |
2855 p = (struct cmdline_info *)alloc((unsigned)sizeof(struct cmdline_info)); | |
2856 if (p != NULL) | |
2857 save_cmdline(p); | |
2858 return (char_u *)p; | |
2859 } | |
2860 | |
2861 /* | |
2862 * Restore the command line from the return value of save_cmdline_alloc(). | |
2863 */ | |
2864 void | |
2865 restore_cmdline_alloc(p) | |
2866 char_u *p; | |
2867 { | |
2868 if (p != NULL) | |
2869 { | |
2870 restore_cmdline((struct cmdline_info *)p); | |
2871 vim_free(p); | |
2872 } | |
2873 } | |
2874 #endif | |
2875 | |
2844 /* | 2876 /* |
2845 * paste a yank register into the command line. | 2877 * paste a yank register into the command line. |
2846 * used by CTRL-R command in command-line mode | 2878 * used by CTRL-R command in command-line mode |
2847 * insert_reg() can't be used here, because special characters from the | 2879 * insert_reg() can't be used here, because special characters from the |
2848 * register contents will be interpreted as commands. | 2880 * register contents will be interpreted as commands. |