anchor.diff:              State1
       end,
       {next_state, filling, State2};
  -filling({rows, {Recs,false}}, #state{stack={button,Button,_}}=State0) ->
  +filling(cast, {rows, {Recs,false}}, #state{stack={button,Button,_}}=State0) ->
       % receive and store data, prefetch if a 'button sprint' is ongoing (only necessary for Nav=ind)
       State1 = data_append(filling, {Recs,false},State0),
       NewBufBot = State1#state.bufBot,
  
positive.code: -module(dderl_fsm).
  -behaviour(gen_fsm).
  
  %% --------------------------------------------------------------------
  %% Include files
  
negative.code:     State4 = data_clear(State3),
      State5 = gui_clear(#gres{state=tailing,loop= <<"tail">>},State4),
      {next_state, tailing, State5#state{tailMode=true,tailLock=false}};
  completed(cast, {button, <<"...">>, ReplyTo}, State0) ->
      % reject because of uncommitted changes
      State1 = gui_nop(#gres{state=completed,beep=true,message= ?MustCommit},State0#state{replyToFun=ReplyTo}),
      {next_state, completed, State1};
  completed(cast, {button, <<">|...">>, ReplyTo}, State0) ->
      % keep data (if any) and switch .. tail mode
      State1 = reply_stack(completed, ReplyTo, State0),
      State2 = fetch(skip,true,State1),
      State3 = gui_clear(State2),
      State4 = gui_nop(#gres{state=tailing,loop= <<"tail">>},State3),
      {next_state, tailing, State4#state{tailMode=true,tailLock=false}};
  completed(cast, {button, <<"pt">>, ReplyTo}, #state{nav=ind}=State0) ->
      % reject command because of uncommitted changes
      State1 = gui_nop(#gres{state=completed,beep=true,message= ?PtNoSort},State0#state{replyToFun=ReplyTo}),
      {next_state, completed, State1};
  completed(cast, {button, <<"pt">>, ReplyTo}, #state{dirtyCnt=DC}=State0) when DC==0 ->
      % passthrough, schedule tail
      State1 = reply_stack(completed, ReplyTo, State0),
      State2 = data_clear(State1),
      State3 = gui_clear(#gres{state=passthrough,loop= <<"tail">>}, State2),
      State4 = fetch(push,true,State3#state{tailMode=true,tailLock=false}),
      {next_state, passthrough, State4};
  completed(cast, {button, <<"pt">>, ReplyTo}, State0) ->
      % reject command because of uncommitted changes
      State1 = gui_nop(#gres{state=completed,beep=true,message= ?MustCommit},State0#state{replyToFun=ReplyTo}),
      {next_state, completed, State1};
  completed(cast, {button, <<">|">>, ReplyTo}, #state{bufCnt=0}=State0) ->
      % reject command because we have no data
      State1 = reply_stack(completed, ReplyTo, State0),
      State1 = gui_nop(#gres{state=completed,beep=true},State1),
      {next_state, completed, State1};
  completed(cast, {button, <<">|">>, ReplyTo}, #state{bl=BL,bufBot=BufBot}=State0) ->
      % jump .. buffer bottom
      State1 = reply_stack(completed, ReplyTo, State0),
      State2 = gui_replace_until(BufBot,BL,#gres{state=completed},State1),
      {next_state, completed, State2};
  completed(cast, {button, <<"more">>, ReplyTo}, #state{gl=GL,bufBot=BufBot}=State0) ->
      % jump .. buffer bottom
      State1 = reply_stack(completed, ReplyTo, State0),
      State2 = gui_replace_until(BufBot,GL,#gres{state=completed},State1), % was BL
      {next_state, completed, State2};
  completed(cast, {rows, _}, State) ->
      % ignore unsolicited rows
      {next_state, completed, State};
  completed({call, From}, Msg, State) ->
      handle_call(Msg, From, completed, State);
  completed(cast, Msg, State) ->
      handle_event(Msg, completed, State);
  completed(info, Msg, State) ->
      handle_info(Msg, completed, State).
  
  aborted(cast, {button, <<"restart">>, ReplyTo}, #state{dirtyCnt=DC}=State0) when DC==0 ->
      State1 = reply_stack(aborted, ReplyTo, State0),
      State2 = fetch_close(State1),
      State3 = data_clear(State2),
      State4 = fetch(none,false,State3),
      State5 = gui_clear(#gres{state=filling,loop= <<">">>}, State4),
      {next_state, filling, State5#state{tailMode=false}};
  aborted(cast, {button, <<"restart">>, ReplyTo}, State0) ->
      % reject command because of uncommitted changes
      State1 = gui_nop(#gres{state=aborted,beep=true,message= ?MustCommit},State0#state{replyToFun=ReplyTo}),
      {next_state, aborted, State1};
  aborted(cast, {button, <<"...">>, ReplyTo}, #state{dirtyCnt=DC}=State0) when DC==0 ->
      % clear buffers, close and reopen fetch with skip and tail options
      State1 = reply_stack(aborted, ReplyTo, State0),
      State2 = fetch_close(State1),
  