mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Author added License notice
This commit is contained in:
parent
04c67168f7
commit
836ba1366b
1 changed files with 30 additions and 13 deletions
|
|
@ -1,4 +1,17 @@
|
||||||
# zsh mouse (and X clipboard) support v1.5
|
###########################################################################
|
||||||
|
# zsh mouse (and X clipboard) support v1.6
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# Copyright 2004-2011 Stephane Chazelas <stephane_chazelas@yahoo.fr>
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, distribute, and sell this software and
|
||||||
|
# its documentation for any purpose is hereby granted without fee, provided
|
||||||
|
# that the above copyright notice appear in all copies and that both that
|
||||||
|
# copyright notice and this permission notice appear in supporting
|
||||||
|
# documentation. No representations are made about the suitability of this
|
||||||
|
# software for any purpose. It is provided "as is" without express or
|
||||||
|
# implied warranty.
|
||||||
|
###########################################################################
|
||||||
#
|
#
|
||||||
# QUICKSTART: jump to "how to use" below.
|
# QUICKSTART: jump to "how to use" below.
|
||||||
#
|
#
|
||||||
|
|
@ -127,6 +140,7 @@
|
||||||
# Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
|
# Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
|
||||||
#
|
#
|
||||||
# Changes:
|
# Changes:
|
||||||
|
# v1.6 2011-09-15: added Copyright and License notice, no code change
|
||||||
# v1.5 2005-03-12: bug fixes (GPM now works again), xclip prefered over
|
# v1.5 2005-03-12: bug fixes (GPM now works again), xclip prefered over
|
||||||
# xsel as xsel is bogus.
|
# xsel as xsel is bogus.
|
||||||
# v1.4 2005-03-01: <Ctrl-W><Ctrl-W> puts both words on the cut buffer
|
# v1.4 2005-03-01: <Ctrl-W><Ctrl-W> puts both words on the cut buffer
|
||||||
|
|
@ -167,7 +181,7 @@ else
|
||||||
x_clipboard_tool=
|
x_clipboard_tool=
|
||||||
x_selection_tool=
|
x_selection_tool=
|
||||||
fi
|
fi
|
||||||
if [[ -n $x_clipboard_tool ]]; then
|
if [[ -n $x_clipboard_tool && $ZSH_X_COPY_PASTING -gt 0 ]]; then
|
||||||
eval '
|
eval '
|
||||||
get-x-clipboard() {
|
get-x-clipboard() {
|
||||||
(( $+DISPLAY )) || return 1
|
(( $+DISPLAY )) || return 1
|
||||||
|
|
@ -278,7 +292,12 @@ if [[ -n $x_clipboard_tool ]]; then
|
||||||
bindkey -M viins '\e[2;5~' push-x-selection
|
bindkey -M viins '\e[2;5~' push-x-selection
|
||||||
bindkey -M vicmd '\e[2;5~' push-x-selection
|
bindkey -M vicmd '\e[2;5~' push-x-selection
|
||||||
|
|
||||||
# for terminal without an insert key:
|
# same for rxvt:
|
||||||
|
bindkey -M emacs '\e[2^' push-x-selection
|
||||||
|
bindkey -M viins '\e[2^' push-x-selection
|
||||||
|
bindkey -M vicmd '\e[2^' push-x-selection
|
||||||
|
|
||||||
|
# for terminals without an insert key:
|
||||||
bindkey -M vicmd X push-x-selection
|
bindkey -M vicmd X push-x-selection
|
||||||
bindkey -M emacs '^XX' push-x-selection
|
bindkey -M emacs '^XX' push-x-selection
|
||||||
|
|
||||||
|
|
@ -474,7 +493,7 @@ if [[ $TERM = *[xeEk]term* ||
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
local bt mx my
|
local bt mx my
|
||||||
|
|
||||||
# either xterm mouse tracking or binded xterm event
|
# either xterm mouse tracking or bound xterm event
|
||||||
# read the event from the terminal
|
# read the event from the terminal
|
||||||
read -k bt # mouse button, x, y reported after \e[M
|
read -k bt # mouse button, x, y reported after \e[M
|
||||||
bt=$((#bt & 0x47))
|
bt=$((#bt & 0x47))
|
||||||
|
|
@ -641,5 +660,3 @@ zle-toggle-mouse() {
|
||||||
zle-update-mouse-driver
|
zle-update-mouse-driver
|
||||||
}
|
}
|
||||||
zle -N zle-toggle-mouse
|
zle -N zle-toggle-mouse
|
||||||
|
|
||||||
zle-toggle-mouse
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue