aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/ops.c9
-rw-r--r--src/nvim/ops.h9
3 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index dd23f6ece9..b2acc561be 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -1597,7 +1597,7 @@ static int command_line_insert_reg(CommandLineState *s)
bool literally = false;
if (s->c != ESC) { // use ESC to cancel inserting register
- literally = i == Ctrl_R;
+ literally = i == Ctrl_R || is_literal_register(s->c);
cmdline_paste(s->c, literally, false);
// When there was a serious error abort getting the
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index de77cdd238..c39a3273da 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -854,15 +854,6 @@ static bool is_append_register(int regname)
return ASCII_ISUPPER(regname);
}
-/// @see get_yank_register
-/// @returns true when register should be inserted literally
-/// (selection or clipboard)
-static inline bool is_literal_register(int regname)
- FUNC_ATTR_CONST
-{
- return regname == '*' || regname == '+';
-}
-
/// @return a copy of contents in register `name` for use in do_put. Should be
/// freed by caller.
yankreg_T *copy_register(int name)
diff --git a/src/nvim/ops.h b/src/nvim/ops.h
index 81e006be27..e378d2f7b5 100644
--- a/src/nvim/ops.h
+++ b/src/nvim/ops.h
@@ -123,6 +123,15 @@ static inline int op_reg_index(const int regname)
}
}
+/// @see get_yank_register
+/// @return true when register should be inserted literally
+/// (selection or clipboard)
+static inline bool is_literal_register(const int regname)
+ FUNC_ATTR_CONST
+{
+ return regname == '*' || regname == '+';
+}
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ops.h.generated.h"
#endif