Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: New zed and refresh bug



> > hzoli@xxxxxxxxxx wrote:
> > > The zed distributed with pre4 does not exit properli on ^C interrupt.
>                                                      ~~~ oops.
> > > ...
> > > integer tmout=TMOUT
> > > ...
> > >   TMOUT=tmout
> > 
> > I think some $ are wanted here.
> 
> The first is OK, and the second used to work because TMOUT was a special
> integer parameter and $ is not necessary when assigning an integer
> parameter.  But you are right that now TMOUT=$tmout or ((TMOUT=tmout))
> should be used.  I'll fix it.

I's even simpler.  Since TMOUT is not special now, the patch below works.
Note that integer makes TMOUT local.

Zoltan


*** Functions/zed	1996/07/28 22:31:53	2.3
--- Functions/zed	1996/07/29 14:17:47
***************
*** 8,14 ****
  # compctl -f -x 'w[1,-f]' -F -- zed
  
  local var fun ctrl_W_bind="$(bindkey '^W')"
! integer tmout=TMOUT
  
  [[ $1 = -f || $0 = fned ]] && fun=1
  [[ $1 = -(|-|f) ]] && shift
--- 8,15 ----
  # compctl -f -x 'w[1,-f]' -F -- zed
  
  local var fun ctrl_W_bind="$(bindkey '^W')"
! # We do not want timeout while we are editing a file
! integer TMOUT=0
  
  [[ $1 = -f || $0 = fned ]] && fun=1
  [[ $1 = -(|-|f) ]] && shift
***************
*** 21,33 ****
    bindkey "^X^W" undefined-key
    bindkey "^W" "$ctrl_W_bind"
    trap - INT
-   TMOUT=tmout
  }
  
  trap 'cleanup ; return 130' INT
- 
- # We do not want timeout while we are editing a file
- TMOUT=0
  
  # don't mangle !'s
  setopt localoptions nobanghist
--- 22,30 ----



Messages sorted by: Reverse Date, Date, Thread, Author