]> git.ipfire.org Git - ipfire-3.x.git/blame - vim/patches/vim-7.3.171.patch0
vim: Import latest patches from upstream.
[ipfire-3.x.git] / vim / patches / vim-7.3.171.patch0
CommitLineData
c6060300
MT
1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.171
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.171
11Problem: When the clipboard isn't supported: ":yank*" gives a confusing
12 error message.
13Solution: Specifically mention that the register name is invalid.
14 (Jean-Rene David)
15Files: runtime/doc/change.txt, src/ex_docmd.c, src/globals.h
16
17
18*** ../vim-7.3.170/runtime/doc/change.txt 2010-08-15 21:57:18.000000000 +0200
19--- runtime/doc/change.txt 2011-05-05 13:48:00.000000000 +0200
20***************
21*** 916,923 ****
22 {Visual}["x]Y Yank the highlighted lines [into register x] (for
23 {Visual} see |Visual-mode|). {not in Vi}
24
25! *:y* *:yank*
26! :[range]y[ank] [x] Yank [range] lines [into register x].
27
28 :[range]y[ank] [x] {count}
29 Yank {count} lines, starting with last line number
30--- 917,926 ----
31 {Visual}["x]Y Yank the highlighted lines [into register x] (for
32 {Visual} see |Visual-mode|). {not in Vi}
33
34! *:y* *:yank* *E850*
35! :[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
36! "* or "+ registers is possible only in GUI versions or
37! when the |+xterm_clipboard| feature is included.
38
39 :[range]y[ank] [x] {count}
40 Yank {count} lines, starting with last line number
41*** ../vim-7.3.170/src/ex_docmd.c 2011-04-11 21:35:03.000000000 +0200
42--- src/ex_docmd.c 2011-05-05 13:48:57.000000000 +0200
43***************
44*** 2424,2448 ****
45 if ( (ea.argt & REGSTR)
46 && *ea.arg != NUL
47 #ifdef FEAT_USR_CMDS
48- && valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
49- && USER_CMDIDX(ea.cmdidx)))
50 /* Do not allow register = for user commands */
51 && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
52- #else
53- && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
54 #endif
55 && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
56 {
57! ea.regname = *ea.arg++;
58! #ifdef FEAT_EVAL
59! /* for '=' register: accept the rest of the line as an expression */
60! if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
61 {
62! set_expr_line(vim_strsave(ea.arg));
63! ea.arg += STRLEN(ea.arg);
64 }
65 #endif
66! ea.arg = skipwhite(ea.arg);
67 }
68
69 /*
70--- 2424,2462 ----
71 if ( (ea.argt & REGSTR)
72 && *ea.arg != NUL
73 #ifdef FEAT_USR_CMDS
74 /* Do not allow register = for user commands */
75 && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
76 #endif
77 && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
78 {
79! #ifndef FEAT_CLIPBOARD
80! /* check these explicitly for a more specific error message */
81! if (*ea.arg == '*' || *ea.arg == '+')
82 {
83! errormsg = (char_u *)_(e_invalidreg);
84! goto doend;
85 }
86 #endif
87! if (
88! #ifdef FEAT_USR_CMDS
89! valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
90! && USER_CMDIDX(ea.cmdidx)))
91! #else
92! valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
93! #endif
94! )
95! {
96! ea.regname = *ea.arg++;
97! #ifdef FEAT_EVAL
98! /* for '=' register: accept the rest of the line as an expression */
99! if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
100! {
101! set_expr_line(vim_strsave(ea.arg));
102! ea.arg += STRLEN(ea.arg);
103! }
104! #endif
105! ea.arg = skipwhite(ea.arg);
106! }
107 }
108
109 /*
110*** ../vim-7.3.170/src/globals.h 2011-02-15 17:39:14.000000000 +0100
111--- src/globals.h 2011-05-05 13:47:44.000000000 +0200
112***************
113*** 1561,1566 ****
114--- 1561,1569 ----
115 (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC))
116 EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set"));
117 #endif
118+ #ifndef FEAT_CLIPBOARD
119+ EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name"));
120+ #endif
121
122 #ifdef MACOS_X_UNIX
123 EXTERN short disallow_gui INIT(= FALSE);
124*** ../vim-7.3.170/src/version.c 2011-04-28 19:05:01.000000000 +0200
125--- src/version.c 2011-05-05 14:24:39.000000000 +0200
126***************
127*** 716,717 ****
128--- 716,719 ----
129 { /* Add new patch number below this line */
130+ /**/
131+ 171,
132 /**/
133
134--
135hundred-and-one symptoms of being an internet addict:
13653. To find out what time it is, you send yourself an e-mail and check the
137 "Date:" field.
138
139 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
140/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
141\\\ an exciting new programming language -- http://www.Zimbu.org ///
142 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///