Skip to content

Commit

Permalink
erlang: add recursive search fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Jul 24, 2023
1 parent 383fa9a commit 73c5b65
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions patches/buildroot/0015-erlang-add-recursive-search-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From b6b742c76882acd20cc500285789d8573adb1348 Mon Sep 17 00:00:00 2001
From: Frank Hunleth <[email protected]>
Date: Mon, 24 Jul 2023 08:40:31 -0400
Subject: [PATCH] erlang: add recursive search fix

---
...Fix-SSH-recursive-search-with-CTRL-R.patch | 36 +++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 package/erlang/26.0.2/0003-Fix-SSH-recursive-search-with-CTRL-R.patch

diff --git a/package/erlang/26.0.2/0003-Fix-SSH-recursive-search-with-CTRL-R.patch b/package/erlang/26.0.2/0003-Fix-SSH-recursive-search-with-CTRL-R.patch
new file mode 100644
index 0000000000..0977888f3e
--- /dev/null
+++ b/package/erlang/26.0.2/0003-Fix-SSH-recursive-search-with-CTRL-R.patch
@@ -0,0 +1,36 @@
+From 1e1843640549387a4926697314ec683bc83d7bb2 Mon Sep 17 00:00:00 2001
+From: Jon Carstens <[email protected]>
+Date: Sat, 15 Jul 2023 09:34:36 -0600
+Subject: [PATCH] Fix SSH recursive search with CTRL+R
+
+`group.erl` now sends `put_expand_no_trim` when entering a history search.
+`ssh_cli` does not support that message and so when entering a search when
+SSH is the underlying driver, the expanded result would not be displayed
+even though the search functionality would still technically work.
+
+This adds support for that `put_expand_no_trim` message when using SSH
+---
+ lib/ssh/src/ssh_cli.erl | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl
+index 9f6d3be21d..30588fa6cf 100644
+--- a/lib/ssh/src/ssh_cli.erl
++++ b/lib/ssh/src/ssh_cli.erl
+@@ -424,6 +424,8 @@ io_request({put_chars, Cs}, Buf, Tty, _Group) ->
+ put_chars(bin_to_list(Cs), Buf, Tty);
+ io_request({put_chars, unicode, Cs}, Buf, Tty, _Group) ->
+ put_chars(unicode:characters_to_list(Cs,unicode), Buf, Tty);
++io_request({put_expand_no_trim, unicode, Expand}, Buf, Tty, _Group) ->
++ insert_chars(unicode:characters_to_list(Expand, unicode), Buf, Tty);
+ io_request({insert_chars, Cs}, Buf, Tty, _Group) ->
+ insert_chars(bin_to_list(Cs), Buf, Tty);
+ io_request({insert_chars, unicode, Cs}, Buf, Tty, _Group) ->
+@@ -983,4 +985,3 @@ fmt_kv1({K,h,V}) -> io_lib:format("~n~p: ~s",[K, [$\n|ssh_dbg:hex_dump(V)]]).
+ type(0) -> "0 (normal data)";
+ type(1) -> "1 (extended data, i.e. errors)";
+ type(T) -> T.
+-
+--
+2.34.1
+
--
2.34.1

0 comments on commit 73c5b65

Please sign in to comment.