aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-30 07:18:12 +0800
committerGitHub <noreply@github.com>2023-05-30 07:18:12 +0800
commit55f6a1cab031ecc28c5a7f2558a0cac9df2145e1 (patch)
treea1de3a75f54b7a728fa846f6d4c2df3276e4a424 /src/nvim/ops.h
parente8776074f50593df90402a3642236990edfba6f0 (diff)
downloadrneovim-55f6a1cab031ecc28c5a7f2558a0cac9df2145e1.tar.gz
rneovim-55f6a1cab031ecc28c5a7f2558a0cac9df2145e1.tar.bz2
rneovim-55f6a1cab031ecc28c5a7f2558a0cac9df2145e1.zip
vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register (#23817)
Problem: Incsearch not triggered when pasting clipboard register on the command line. Solution: Also set "literally" when using a clipboard register. (Ken Takata, closes vim/vim#12460) https://github.com/vim/vim/commit/9cf6ab133227ac7e9169941752293bb7178d8e38 Co-authored-by: K.Takata <kentkt@csc.jp>
Diffstat (limited to 'src/nvim/ops.h')
-rw-r--r--src/nvim/ops.h9
1 files changed, 9 insertions, 0 deletions
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