Problems with v0.1.x & syntax-highlighting/history-substring-search #98

Closed
hcgraf opened this Issue Jan 29, 2016 · 1 comment

2 participants

@hcgraf

Another issue with v0.1.x from my comment to #91

  • history-substring-search highlighting is broken by v0.1.x

This one seems to be very tricky, as it seems to appear only with the combination of three plugins

It works when commenting either syntax-highligting or autosuggestions or by using autosuggestions (7a00bfa)

Here is a minimal zshrc, new user, no tmux, ubuntu 15.10, zsh 5.1.1:

autoload -U colors && colors
autoload -Uz compinit && compinit

ZGEN_DIR="${HOME}/.zsh-plugins"
ZGEN_RESET_ON_CHANGE=("${HOME}/.zshrc")

source "${HOME}/.zgen/zgen.zsh"

if ! zgen saved; then
        echo "Creating a zgen save"

        # provides zle hooks
        zgen load willghatch/zsh-hooks

        zgen load zsh-users/zsh-syntax-highlighting.git
        zgen load zsh-users/zsh-history-substring-search.git
        zgen load tarruda/zsh-autosuggestions.git . v0.1.x

        # save
        zgen save
fi

[[ -n "${terminfo[kcuu1]}" ]] && bindkey "${terminfo[kcuu1]}" history-substring-search-up
[[ -n "${terminfo[kcud1]}" ]] && bindkey "${terminfo[kcud1]}" history-substring-search-down

function my-line-init() {
        # automatically enable autosuggestion
        autosuggest_start
        # make sure the terminal is in application mode when zle is active. otherwise $terminfo is invalid
        if [[ -n "${terminfo[smkx]}" ]]; then echoti smkx; fi
}
function my-line-finish() { if [[ -n "${terminfo[rmkx]}" ]]; then echoti rmkx; fi }
hooks-add-hook zle_line_init_hook my-line-init
hooks-add-hook zle_line_finish_hook my-line-finish
@ericfreese ericfreese modified the milestone: v0.1.0 Jan 29, 2016
@ericfreese
zsh-users member

This should be fixed on v0.1.x.

@ericfreese ericfreese closed this Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment