Skip to content
Snippets Groups Projects
Unverified Commit 417bca03 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

Add shift-up and shift-down

For now, they are respectively bound to preview-up and preview-down
by default (TBD).

Not available on tcell build.

Close #1201
parent cce6aef5
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
..
.TH fzf 1 "Dec 2017" "fzf 0.17.3" "fzf - a command-line fuzzy finder"
.TH fzf 1 "Feb 2018" "fzf 0.17.4-devel" "fzf - a command-line fuzzy finder"
.SH NAME
fzf - a command-line fuzzy finder
......@@ -477,6 +477,8 @@ e.g. \fBfzf --bind=ctrl-j:accept,ctrl-k:kill-line\fR
\fIend\fR
\fIpgup\fR (\fIpage-up\fR)
\fIpgdn\fR (\fIpage-down\fR)
\fIshift-up\fR
\fIshift-down\fR
\fIshift-left\fR
\fIshift-right\fR
\fIleft-click\fR
......@@ -520,8 +522,8 @@ triggered whenever the query string is changed.
\fBpage-up\fR \fIpgup\fR
\fBhalf-page-down\fR
\fBhalf-page-up\fR
\fBpreview-down\fR
\fBpreview-up\fR
\fBpreview-down\fR \fIshift-down\fR
\fBpreview-up\fR \fIshift-up\fR
\fBpreview-page-down\fR
\fBpreview-page-up\fR
\fBprevious-history\fR (\fIctrl-p\fR on \fB--history\fR)
......
......@@ -426,6 +426,10 @@ func parseKeyChords(str string, message string) map[int]string {
chord = tui.PgUp
case "pgdn", "page-down":
chord = tui.PgDn
case "shift-up":
chord = tui.SUp
case "shift-down":
chord = tui.SDown
case "shift-left":
chord = tui.SLeft
case "shift-right":
......
......@@ -277,6 +277,9 @@ func defaultKeymap() map[int][]action {
keymap[tui.PgUp] = toActions(actPageUp)
keymap[tui.PgDn] = toActions(actPageDown)
keymap[tui.SUp] = toActions(actPreviewUp)
keymap[tui.SDown] = toActions(actPreviewDown)
keymap[tui.Rune] = toActions(actRune)
keymap[tui.Mouse] = toActions(actMouse)
keymap[tui.DoubleClick] = toActions(actAccept)
......
......@@ -458,25 +458,22 @@ func (r *LightRenderer) escSequence(sz *int) Event {
}
}
return Event{Invalid, 0, nil}
case 59:
case ';':
if len(r.buffer) != 6 {
return Event{Invalid, 0, nil}
}
*sz = 6
switch r.buffer[4] {
case 50:
case '2', '5':
switch r.buffer[5] {
case 68:
return Event{Home, 0, nil}
case 67:
return Event{End, 0, nil}
}
case 53:
switch r.buffer[5] {
case 68:
return Event{SLeft, 0, nil}
case 67:
case 'A':
return Event{SUp, 0, nil}
case 'B':
return Event{SDown, 0, nil}
case 'C':
return Event{SRight, 0, nil}
case 'D':
return Event{SLeft, 0, nil}
}
} // r.buffer[4]
} // r.buffer[3]
......
......@@ -61,6 +61,8 @@ const (
Home
End
SUp
SDown
SLeft
SRight
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment