From a18982cb839d7f05e32b1026bbd99b8aa34ad189 Mon Sep 17 00:00:00 2001 From: James Tirta Halim Date: Mon, 3 Jun 2024 11:00:20 +0700 Subject: refactor: replace '\0' with NUL --- src/nvim/base64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/base64.c') diff --git a/src/nvim/base64.c b/src/nvim/base64.c index a645c64fe3..39e4ec4872 100644 --- a/src/nvim/base64.c +++ b/src/nvim/base64.c @@ -4,6 +4,7 @@ #include #include "auto/config.h" // IWYU pragma: keep +#include "nvim/ascii_defs.h" #include "nvim/base64.h" #include "nvim/memory.h" @@ -125,7 +126,7 @@ char *base64_encode(const char *src, size_t src_len) dest[out_i] = '='; } - dest[out_len] = '\0'; + dest[out_len] = NUL; return dest; } -- cgit From 3ad977f01d97e84b576e6965c5c9e4f75c10cb35 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:18:06 -0500 Subject: feat(terminal): add support for copying with OSC 52 in embedded terminal (#29117) When libvterm receives the OSC 52 escape sequence it ignores it because Nvim does not set any selection callbacks. Install selection callbacks that forward to the clipboard provider, so that setting the clipboard with OSC 52 in the embedded terminal writes to the system clipboard using the configured clipboard provider. --- src/nvim/base64.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/base64.c') diff --git a/src/nvim/base64.c b/src/nvim/base64.c index 39e4ec4872..99d3c5a33e 100644 --- a/src/nvim/base64.c +++ b/src/nvim/base64.c @@ -142,6 +142,7 @@ char *base64_encode(const char *src, size_t src_len) /// @param [out] out_lenp Returns the length of the decoded string /// @return Decoded string char *base64_decode(const char *src, size_t src_len, size_t *out_lenp) + FUNC_ATTR_NONNULL_ALL { assert(src != NULL); assert(out_lenp != NULL); -- cgit