aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/misc1.c
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-06-09 19:06:48 +0200
committerDaniel Hahler <git@thequod.de>2019-08-07 14:21:23 +0200
commit664b6adebe8b3d12505683a1b7e96d6a2225b86c (patch)
tree863d354236e3583630b83c4aaed5dd41cdbf8bd3 /src/nvim/misc1.c
parent1117592f6472c72a71f911009c27e361fcf1eef5 (diff)
downloadrneovim-664b6adebe8b3d12505683a1b7e96d6a2225b86c.tar.gz
rneovim-664b6adebe8b3d12505683a1b7e96d6a2225b86c.tar.bz2
rneovim-664b6adebe8b3d12505683a1b7e96d6a2225b86c.zip
move ins_bytes, ins_bytes_len
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r--src/nvim/misc1.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index 2ddfbc75ab..76c861e97c 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -1380,37 +1380,6 @@ int plines_m_win(win_T *wp, linenr_T first, linenr_T last)
return count;
}
-/*
- * Insert string "p" at the cursor position. Stops at a NUL byte.
- * Handles Replace mode and multi-byte characters.
- */
-void ins_bytes(char_u *p)
-{
- ins_bytes_len(p, STRLEN(p));
-}
-
-/// Insert string "p" with length "len" at the cursor position.
-/// Handles Replace mode and multi-byte characters.
-void ins_bytes_len(char_u *p, size_t len)
-{
- if (has_mbyte) {
- size_t n;
- for (size_t i = 0; i < len; i += n) {
- if (enc_utf8) {
- // avoid reading past p[len]
- n = (size_t)utfc_ptr2len_len(p + i, (int)(len - i));
- } else {
- n = (size_t)(*mb_ptr2len)(p + i);
- }
- ins_char_bytes(p + i, n);
- }
- } else {
- for (size_t i = 0; i < len; i++) {
- ins_char(p[i]);
- }
- }
-}
-
/// Insert or replace a single character at the cursor position.
/// When in REPLACE or VREPLACE mode, replace any existing character.
/// Caller must have prepared for undo.