zsh-workers
 help / color / mirror / code / Atom feed
5bd5d57f769b90531fc5f6fd14ffcd7bc4298b72 blob 747 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
# Like up-line-or-search, but uses the whole line prefix up to the
# cursor position for searching backwards.

typeset -g __searching __savecursor

up-line-or-beginning-search () {
    emulate -L zsh

    if [[ $LBUFFER == *$'\n'* ]]; then
        zle .up-line-or-history
        __searching=''
    elif [[ -n $PREBUFFER ]] &&
        zstyle -t ':zle:up-line-or-beginning-search' edit-buffer
    then
        zle .push-line-or-edit
    else
        [[ $LASTWIDGET = $__searching ]] && CURSOR=$__savecursor
        __savecursor=$CURSOR
        __searching=$WIDGET
        zle .history-beginning-search-backward
        zstyle -T ':zle:up-line-or-beginning-search' leave-cursor &&
        zle .end-of-line
    fi
}

up-line-or-beginning-search "$@"
debug log:

solving 5bd5d57 ...
found 5bd5d57 in https://inbox.vuxu.org/zsh-workers/877gn3h9q9.fsf@ft.bewatermyfriend.org/ ||
	https://inbox.vuxu.org/zsh-workers/1358975768-25411-1-git-send-email-ft@bewatermyfriend.org/
found 5348e7a in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 5348e7ad39abe1e7850a2d7d47e75db3af63a70f	Functions/Zle/up-line-or-beginning-search

applying [1/2] https://inbox.vuxu.org/zsh-workers/877gn3h9q9.fsf@ft.bewatermyfriend.org/
diff --git a/Functions/Zle/up-line-or-beginning-search b/Functions/Zle/up-line-or-beginning-search
index 5348e7a..5bd5d57 100644

Checking patch Functions/Zle/up-line-or-beginning-search...
error: while searching for:
# Like up-line-or-search, but uses the whole line prefix up to the
# cursor position for searching backwards.

    emulate -L zsh

    if [[ $LBUFFER == *$'\n'* ]]; then

error: patch failed: Functions/Zle/up-line-or-beginning-search:1
error: Functions/Zle/up-line-or-beginning-search: patch does not apply

git apply error: exit status=1
trying https://inbox.vuxu.org/zsh-workers/1358975768-25411-1-git-send-email-ft@bewatermyfriend.org/

applying [2/2] https://inbox.vuxu.org/zsh-workers/1358975768-25411-1-git-send-email-ft@bewatermyfriend.org/
diff --git a/Functions/Zle/up-line-or-beginning-search b/Functions/Zle/up-line-or-beginning-search
index 5348e7a..5bd5d57 100644

Checking patch Functions/Zle/up-line-or-beginning-search...
Applied patch Functions/Zle/up-line-or-beginning-search cleanly.

index at:
100644 5bd5d57f769b90531fc5f6fd14ffcd7bc4298b72	Functions/Zle/up-line-or-beginning-search

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).