1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When the clipboard isn't supported: ":yank*" gives a confusing
13 Solution: Specifically mention that the register name is invalid.
15 Files: runtime/doc/change.txt, src/ex_docmd.c, src/globals.h
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
22 {Visual}["x]Y Yank the highlighted lines [into register x] (for
23 {Visual} see |Visual-mode|). {not in Vi}
26 ! :[range]y[ank] [x] Yank [range] lines [into register x].
28 :[range]y[ank] [x] {count}
29 Yank {count} lines, starting with last line number
31 {Visual}["x]Y Yank the highlighted lines [into register x] (for
32 {Visual} see |Visual-mode|). {not in Vi}
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.
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
45 if ( (ea.argt & REGSTR)
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 != '=')
53 - && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
55 && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
57 ! ea.regname = *ea.arg++;
59 ! /* for '=' register: accept the rest of the line as an expression */
60 ! if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
62 ! set_expr_line(vim_strsave(ea.arg));
63 ! ea.arg += STRLEN(ea.arg);
66 ! ea.arg = skipwhite(ea.arg);
71 if ( (ea.argt & REGSTR)
74 /* Do not allow register = for user commands */
75 && (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
77 && !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
79 ! #ifndef FEAT_CLIPBOARD
80 ! /* check these explicitly for a more specific error message */
81 ! if (*ea.arg == '*' || *ea.arg == '+')
83 ! errormsg = (char_u *)_(e_invalidreg);
88 ! #ifdef FEAT_USR_CMDS
89 ! valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
90 ! && USER_CMDIDX(ea.cmdidx)))
92 ! valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
96 ! ea.regname = *ea.arg++;
98 ! /* for '=' register: accept the rest of the line as an expression */
99 ! if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
101 ! set_expr_line(vim_strsave(ea.arg));
102 ! ea.arg += STRLEN(ea.arg);
105 ! ea.arg = skipwhite(ea.arg);
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
115 (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC))
116 EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set"));
118 + #ifndef FEAT_CLIPBOARD
119 + EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name"));
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
129 { /* Add new patch number below this line */
135 hundred-and-one symptoms of being an internet addict:
136 53. To find out what time it is, you send yourself an e-mail and check the
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 ///