aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-26 19:39:38 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-05-26 20:24:11 -0400
commit21f160746a4b406f84311a64fff96c1bd52f23c9 (patch)
tree20b69ca7e01201f0a68d2a1d22db8a4377411cc0 /runtime
parentfb4d5a184678ab231da20ef559c8e423dfa54d6e (diff)
downloadrneovim-21f160746a4b406f84311a64fff96c1bd52f23c9.tar.gz
rneovim-21f160746a4b406f84311a64fff96c1bd52f23c9.tar.bz2
rneovim-21f160746a4b406f84311a64fff96c1bd52f23c9.zip
vim-patch:8.1.0020: cannot tell whether a register is executing or recording
Problem: Cannot tell whether a register is being used for executing or recording. Solution: Add reg_executing() and reg_recording(). (Hirohito Higashi, closes vim/vim#2745) Rename the global variables for consistency. Store the register name in reg_executing. https://github.com/vim/vim/commit/0b6d911e5de1a1c10a23d4c2ee1b0275c474a2dd
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt11
-rw-r--r--runtime/doc/usr_41.txt2
2 files changed, 13 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index cd5632e70c..c96f51772d 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2227,6 +2227,8 @@ range({expr} [, {max} [, {stride}]])
List items from {expr} to {max}
readfile({fname} [, {binary} [, {max}]])
List get list of lines from file {fname}
+reg_executing() Number get the executing register name
+reg_recording() String get the recording register name
reltime([{start} [, {end}]]) List get time value
reltimefloat({time}) Float turn the time value into a Float
reltimestr({time}) String turn time value into a String
@@ -6434,6 +6436,15 @@ readfile({fname} [, {binary} [, {max}]])
the result is an empty list.
Also see |writefile()|.
+reg_executing() *reg_executing()*
+ Returns the single letter name of the register being executed.
+ Returns an empty string when no register is being executed.
+ See |@|.
+
+reg_recording() *reg_recording()*
+ Returns the single letter name of the register being recorded.
+ Returns an empty string string when not recording. See |q|.
+
reltime([{start} [, {end}]]) *reltime()*
Return an item that represents a time value. The format of
the item depends on the system. It can be passed to
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index b8fd6cdf7b..def781c109 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -962,6 +962,8 @@ Various: *various-functions*
getreg() get contents of a register
getregtype() get type of a register
setreg() set contents and type of a register
+ reg_executing() return the name of the register being executed
+ reg_recording() return the name of the register being recorded
shiftwidth() effective value of 'shiftwidth'