summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-22 20:35:17 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-22 20:35:17 +0200
commit0b6d911e5de1a1c10a23d4c2ee1b0275c474a2dd (patch)
tree3d33047a64f47e30852f5d6f187f316d12b3f55b /runtime
parentb4518563c73460150344a57879bf5b22cb8b1c77 (diff)
patch 8.1.0020: cannot tell whether a register is executing or recordingv8.1.0020
Problem: Cannot tell whether a register is being used for executing or recording. Solution: Add reg_executing() and reg_recording(). (Hirohito Higashi, closes #2745) Rename the global variables for consistency. Store the register name in reg_executing.
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 de4bb0260d..905074c8b9 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2302,6 +2302,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
@@ -6558,6 +6560,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 279dd20c7b..f891f441cf 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -1018,6 +1018,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'