1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-29 01:24:52 +03:00

Merge branch 'master' into colorscheme

This commit is contained in:
Maxime Coste 2015-07-03 21:33:08 +01:00
commit 15a34be46d
5 changed files with 15 additions and 6 deletions

View File

@ -466,7 +466,9 @@ Commands
When pressing `:` in normal mode, Kakoune will open a prompt to enter a command.
Commands are used for non editing tasks, such as opening a buffer, writing the
current one, quitting, etc.
current one, quitting, etc. You can cycle through the command history with
`<c-p>` and `<c-n>`. Commands starting with horizontal whitespace (e.g. a
space) will not be saved in the command history.
Basic Commands
~~~~~~~~~~~~~~

View File

@ -33,7 +33,14 @@ def -hidden -shell-params _man %{ %sh{
fi
} }
def -shell-params man %{ %sh{
def -shell-params \
-shell-completion %{
prefix=${1:0:${kak_pos_in_token}}
for page in /usr/share/man/*/${prefix}*.1.gz; do
basename $page .1.gz
done
} \
man %{ %sh{
[ -z "$@" ] && set -- "$kak_selection"
echo "eval -try-client %opt{docsclient} _man $@"
} }

View File

@ -7,8 +7,8 @@ hook global BufSetOption mimetype=text/x-shellscript %{
}
addhl -group / regions -default code sh \
double_string %{"} %{(?<!\\)(\\\\)*"} '' \
single_string %{'} %{(?<!\\)(\\\\)*'} '' \
double_string %{(?<!\\)(\\\\)*\K"} %{(?<!\\)(\\\\)*"} '' \
single_string %{(?<!\\)(\\\\)*\K'} %{'} '' \
comment '(?<!\$)#' '$' ''
addhl -group /sh/double_string fill string

View File

@ -842,7 +842,7 @@ private:
static void history_push(History& history, StringView entry)
{
if(entry.empty())
if(entry.empty() or is_horizontal_blank(entry[0_byte]))
{
return;
}

View File

@ -482,7 +482,7 @@ Key NCursesUI::get_key()
auto wheel_down_mask = NCURSES_MOUSE_MASK(m_wheel_down_button, NCURSES_BUTTON_PRESSED);
auto wheel_up_mask = NCURSES_MOUSE_MASK(m_wheel_up_button, NCURSES_BUTTON_PRESSED);
CharCoord pos{ ev.y, ev.x };
CharCoord pos{ ev.y - (m_status_on_top ? 1 : 0), ev.x };
if ((ev.bstate & BUTTON1_PRESSED) == BUTTON1_PRESSED) return mouse_press(pos);
if ((ev.bstate & BUTTON1_RELEASED) == BUTTON1_RELEASED) return mouse_release(pos);
if ((ev.bstate & wheel_down_mask) == wheel_down_mask) return mouse_wheel_down(pos);