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

Re: Live Clock Causes Directory Flashing In URxvt & XTerm



Hi,

I can't say much about the problem you're describing, but I've spotting
something in your setup, that I thought I might mention:

S. M. wrote:
[...]

You do this for keyboard setup:

> typeset -A key
> key[Home]=${terminfo[khome]}
[...]

> [[ -n "${key[Home]}"    ]]  && bindkey  "${key[Home]}"    beginning-of-line
[...]

That will only work reliably, if you also put the terminal you're using
into keyboard-transmit mode while the line editor (ZLE) is active. You
can do that like this:

#+BEGIN_SRC shell
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then

    # If these entries are not  available for a given terminal, then
    # that terminal  is in  keyboard-transmit mode by  default. That
    # means, everything  is well  without any additional  action. If
    # not, this can do the trick:

    function zle-line-init () {
        echoti smkx
    }

    function zle-line-finish () {
        echoti rmkx
    }

    zle -N zle-line-init
    zle -N zle-line-finish

fi
#+END_SRC


Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



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