diff options
author | Raimo Niskanen <[email protected]> | 2010-07-07 10:43:10 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-07-07 10:43:10 +0200 |
commit | 4e0dc5047e67f8c697c98e4967b44315d54eff1a (patch) | |
tree | ece26801f1681c719be4062207e4080314b9a9c6 /lib/debugger/src/dbg_ui_winman.erl | |
parent | 91078fbc7b0719150a0c7749a1de9e5c0c9bbdeb (diff) | |
parent | 8e79baa449f43889f7e92030258df90ab0045a81 (diff) | |
download | otp-4e0dc5047e67f8c697c98e4967b44315d54eff1a.tar.gz otp-4e0dc5047e67f8c697c98e4967b44315d54eff1a.tar.bz2 otp-4e0dc5047e67f8c697c98e4967b44315d54eff1a.zip |
Merge branch 'ks/cleanups' into dev
* ks/cleanups:
compiler: Fix incorrect types and specs
escript: Add more types to records
debugger: Clean up as suggested by tidier
docbuilder: Clean up as suggested by tidier
Conflicts:
lib/debugger/src/dbg_iload.erl
lib/debugger/src/dbg_ui_trace_win.erl
Diffstat (limited to 'lib/debugger/src/dbg_ui_winman.erl')
-rw-r--r-- | lib/debugger/src/dbg_ui_winman.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/debugger/src/dbg_ui_winman.erl b/lib/debugger/src/dbg_ui_winman.erl index 71023cd0d6..398735a7ca 100644 --- a/lib/debugger/src/dbg_ui_winman.erl +++ b/lib/debugger/src/dbg_ui_winman.erl @@ -120,9 +120,9 @@ init(_Arg) -> {ok, #state{}}. handle_call({is_started, Title}, _From, State) -> - Reply = case lists:keysearch(Title, #win.title, State#state.wins) of - {value, Win} -> {true, Win#win.win}; - false -> false + Reply = case lists:keyfind(Title, #win.title, State#state.wins) of + false -> false; + Win -> {true, Win#win.win} end, {reply, Reply, State}. @@ -134,8 +134,8 @@ handle_cast({insert, Pid, Title, Win}, State) -> handle_cast({clear_process, Title}, State) -> OldWins = State#state.wins, - Wins = case lists:keysearch(Title, #win.title, OldWins) of - {value, #win{owner=Pid}} -> + Wins = case lists:keyfind(Title, #win.title, OldWins) of + #win{owner=Pid} -> Msg = {dbg_ui_winman, destroy}, Pid ! Msg, lists:keydelete(Title, #win.title, OldWins); @@ -147,7 +147,7 @@ handle_cast({clear_process, Title}, State) -> handle_info({'EXIT', Pid, _Reason}, State) -> [Mon | _Wins] = State#state.wins, if - Pid==Mon#win.owner -> {stop, normal, State}; + Pid =:= Mon#win.owner -> {stop, normal, State}; true -> Wins2 = lists:keydelete(Pid, #win.owner, State#state.wins), inform_all(Wins2), |