aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2015-05-04 16:16:37 +0200
committerPeter Andersson <[email protected]>2015-05-04 16:16:37 +0200
commit7e65166947985bc62d0f5c903856323194bf07b9 (patch)
treea98003f341493d9ddafb381536b7c3fb6e266916 /lib/kernel
parent887a13fb61fb3ccc39eaa79964d731f10ab17556 (diff)
parentd756777e731fe7a8d63690ca0246c9cbd53dea75 (diff)
downloadotp-7e65166947985bc62d0f5c903856323194bf07b9.tar.gz
otp-7e65166947985bc62d0f5c903856323194bf07b9.tar.bz2
otp-7e65166947985bc62d0f5c903856323194bf07b9.zip
Merge branch 'peppe/jcl_mode_improvements'
* peppe/jcl_mode_improvements: Fix problem with unitialized edlin text buffer Fix shell crash when in switch command mode OTP-12673
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/user_drv.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/kernel/src/user_drv.erl b/lib/kernel/src/user_drv.erl
index e6ce85c379..380c685869 100644
--- a/lib/kernel/src/user_drv.erl
+++ b/lib/kernel/src/user_drv.erl
@@ -133,6 +133,7 @@ server1(Iport, Oport, Shell) ->
flatten(io_lib:format("~ts\n",
[erlang:system_info(system_version)]))},
Iport, Oport),
+
%% Enter the server loop.
server_loop(Iport, Oport, Curr, User, Gr, queue:new()).
@@ -315,6 +316,9 @@ handle_escape(Iport, Oport, User, Gr, IOQueue) ->
_ -> % {ok,jcl} | undefined
io_request({put_chars,unicode,"\nUser switch command\n"}, Iport, Oport),
+ %% init edlin used by switch command and have it copy the
+ %% text buffer from current group process
+ edlin:init(gr_cur_pid(Gr)),
server_loop(Iport, Oport, User, switch_loop(Iport, Oport, Gr), IOQueue)
end.