diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-04-02 19:55:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-04-02 19:55:10 +0200 |
commit | b7cb42bc3878fcb62ed407f47f0a2cc960aa7c1e (patch) | |
tree | 5106cbff25dbcf19891a33f658aac198f1e85137 /runtime | |
parent | 41571769c9a236fd07b333a5eb98c461636b466c (diff) |
updated for version 7.4.242v7.4.242
Problem: getreg() does not distinguish between a NL used for a line break
and a NL used for a NUL character.
Solution: Add another argument to return a list. (ZyX)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index cdf8d72bb2..b09742df81 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1819,7 +1819,8 @@ getmatches() List list of current matches getpid() Number process ID of Vim getpos( {expr}) List position of cursor, mark, etc. getqflist() List list of quickfix items -getreg( [{regname} [, 1]]) String contents of register +getreg( [{regname} [, 1 [, {list}]]]) + String or List contents of register getregtype( [{regname}]) String type of register gettabvar( {nr}, {varname} [, {def}]) any variable {varname} in tab {nr} or {def} @@ -3467,7 +3468,7 @@ getqflist() *getqflist()* :endfor -getreg([{regname} [, 1]]) *getreg()* +getreg([{regname} [, 1 [, {list}]]]) *getreg()* The result is a String, which is the contents of register {regname}. Example: > :let cliptext = getreg('*') @@ -3476,6 +3477,11 @@ getreg([{regname} [, 1]]) *getreg()* getreg('=', 1) returns the expression itself, so that it can be restored with |setreg()|. For other registers the extra argument is ignored, thus you can always give it. + If {list} is present and non-zero result type is changed to + |List|. Each list item is one text line. Use it if you care + about zero bytes possibly present inside register: without + third argument both NLs and zero bytes are represented as NLs + (see |NL-used-for-Nul|). If {regname} is not specified, |v:register| is used. |