Reasonings:
1. It is not used for anything, but scope dictionaries currenly. So there is no
need to generalize and split it into dict_set_var (which will contain some
scope-dictionary-specific checks) and dict_set_value (which will work for any
dictionary).
2. Check for key size is no longer valid for non-scope dictionaries: you *can*
use empty keys there. In scope dictionaries also, but you actually are not
supposed to store there anything, but variables.
Note that actually one may still do
let b:[''] = 1
and “bypass” check for variable name. It won’t change what `echo b:` will show,
but it may affect code which iterates over scope dictionary keys and sets them
to something (if there is such code).
- They are no longer responble for using gettext.
- They now receive string length and use %.* format specifier in messages.
- And one less global: one of the error messages is never repeated.
Problem: When using complete() and typing a character undo is saved after
the character was inserted. (Shougo)
Solution: Save for undo before inserting the character.
d56a79d339
`has_mbyte` is deprecated (globals.h), so `outputlen` is always assigned
within the if statement. Therefore, the previous initialization is
unnecessary.
As stated in globals.h, mbyte flags are deprecated, and code using it can be
refractored to remove dead code. Since has_mbyte is defined to true, this
refractoring correct.
`[RO]` is appended to the status line and `len` is increased with the length of
this string (4). However, the string is marked for translation and may
thus well be larger (or smaller) than 4. Therefore, we check the length at
runtime. The resulting len is never actually used, and thus could be removed.
However, by keeping this line, the body of this if-statement is kept consistent
with surrounding code, and future changes can not forget to add this line when
additional strings are added to p.
The "technically correct" interpretation is to execute the first line
that is seen (and this is what happens on middle-click paste in Vim).
^M is only intended to "defuse" the newline, so the user can review it.
The parent commit changed the behavior to insert <Space> between lines,
but that's a higher-risk change: it is arguably possible that some user
*wants* the literal ^M chars when e.g. assigning to a register:
:let @a='<C-R>b'
To avoid that risk, keep the old behavior and only omit the last ^M.
This makes `yy:<C-R>0` nicer at no cost.
^M isn't any more "correct" than space: the "technically correct"
interpretation is to execute the first line that is seen (and this is
what happens on middle-click paste in Vim). ^M is only intended to
defuse the newline, so that the user can review the command. We can do
that with a space instead, and then the command can be executed without
having to fix it up first.