From b325f7e7acbf805baf43a86f3e3c2285bf573ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 27 Jan 2020 16:50:43 +0100 Subject: vis: make r insert a new line Special case to still insert a carriage return as discussed in #656 and changed in 2cfc9c867bdfd4cc3ae3246f31cf636633fe1a5f. Due to limitations of the current implementation is not generic, i.e. combining it as r will not work. Fixes #765 --- main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index ddf7c4b..bea18e7 100644 --- a/main.c +++ b/main.c @@ -2096,6 +2096,8 @@ static const char *insert_verbatim(Vis *vis, const char *keys, const Arg *arg) { return NULL; if ((rune = vis_keys_codepoint(vis, keys)) != (Rune)-1) { len = runetochar(buf, &rune); + if (buf[0] == '\n') + buf[0] = '\r'; data = buf; } else { vis_info_show(vis, "Unknown key"); -- cgit v1.2.3