Oliver Kiddle
be3882aeb0
driver: adjust region end for vi command mode
5 years ago
Matthew Martin
b55832c5f8
main: Drop X_ from X_ZSH_HIGHLIGHT_DIRS_BLACKLIST
5 years ago
Matthew Martin
972ad197c1
driver: Disable BASH_REMATCH
Fixes #612 .
5 years ago
dana
55f846c673
driver: Avoid warn_create_global warnings
5 years ago
Matthew Martin
8d4c6355e6
driver: Do not pass widget arguments to _zsh_highlight
This avoids a bug in zsh 4.3.12 and prior which affects passing
arguments to an anonymous function.
6 years ago
Daniel Shahaf
56ba7f082d
driver: Clarify comment. No functional change.
6 years ago
Matthew Martin
2cbb3fb24e
driver: Allow for -U in autoloaded function definition
6 years ago
Matthew Martin
f265ef0b9a
driver: Use idiomatic module check
6 years ago
Daniel Shahaf
d0fb0df4ff
driver: Make the shadowing $WIDGET read only.
6 years ago
Daniel Shahaf
f665eec230
driver: Avoid a fork in the common case.
Found-by: Matthew Martin
6 years ago
Daniel Shahaf
b5249f17ab
driver: Rewrite without a state variable
Suggested-by: m0viefreak
8 years ago
Daniel Shahaf
d2594c1157
noop: Make a whitespace-only change to reduce noise in the next commit.
8 years ago
Daniel Shahaf
d4ab7e51d2
redo _zsh_highlight__function_callable_p
8 years ago
Daniel Shahaf
38477f2a3d
driver: Use a different way of checking whether add-zle-hook-widget is present.
Based on code by Bart Schaefer (reference within).
Tested with zsh 5.0.7-5 (debian package) and with 5b4cbcc842c6 (39158,
5.3-to-be of today).
8 years ago
Daniel Shahaf
30c6e70394
driver: Pass zle-line-finish arguments on to _zsh_highlight.
(Currently a noop)
8 years ago
Daniel Shahaf
74a27de70d
driver: Hook zle-line-finish.
Compare issue #288 .
8 years ago
Daniel Shahaf
85e62a8171
driver: Reimplement using 'add-zle-hook-widget zle-line-pre-redraw'
This feature will be released in zsh 5.3. Older zsh's will use the existing
codepath.
8 years ago
Daniel Shahaf
aed99f6a3e
wrappers: Reimplement using Mikachu's zle-line-pre-redraw hook (workers/36650).
9 years ago
Julien Nicoulaud
3a7ddcda0b
#535 : locally enable BARE_GLOB_QUAL option when loading highlighters
6 years ago
Adam Johnson
42d396d819
driver: Exclude yank-pop again ( #183 ).
6 years ago
Bengt Brodersen
db6cac391b
main: Add glob qualifier to work around zsh/macOS bug
zsh/macOS bug: http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=42891
6 years ago
Matthew Martin
2c0c75a8ee
driver, main: Add -z to autoload calls
6 years ago
Matthew Martin
ff85c7e01b
driver: Do not highlight newlines or past BUFFER for zle standout
6 years ago
Matthew Martin
84f0507cf6
driver: Replace eval with ${(P)
6 years ago
Matthew Martin
b07ada1255
driver: Run under emulate -L zsh and add zsyh_user_options
6 years ago
Daniel Shahaf
e4352f98bb
driver: Revert previous commit, unbreaking the build on zsh<5.0.8.
6 years ago
Daniel Shahaf
9d9e9662cf
driver: Correctly escape assoc key pattern
6 years ago
Matthew Martin
a9ce931439
Default possibly unset variables to empty
6 years ago
Daniel Shahaf
a2a899b41b
driver: _zsh_highlight_bind_widgets: Be resilient to NO_UNSET being set in the calling scope.
Fixes #449 .
6 years ago
m0viefreak
3c43da5ffe
driver: Improve comment about ^r pattern match bug
The bug is not specific to 5.3.1.
7 years ago
m0viefreak
f2ba507bbc
driver: Adjust zsh version for probing for pattern match bug
7 years ago
jsoizo
ad522a0914
driver: Fix printing error message to file when cannot resolve highlighters directory location
Fixes #426 .
Review-by: Matthew Martin, me
7 years ago
Daniel Shahaf
be083d7f37
driver: Improve «unhandled ZLE widget 'foo'» error message.
Fixes #409 .
7 years ago
Christian Höltje
835fec7f3c
workaround for PAT_STATIC bug in zsh
ZSH versions less than 5.3.2 (or 5.4) have a bug that prevents
`history-incremental-pattern-search-backward` for working
correctly (the history stops searching after the first found item).
Closes #407
7 years ago
vinter
aac4a44238
driver: Fix duplicated slash in error message
Fixes #400 .
7 years ago
Daniel Shahaf
74949c2d91
driver: Don't undefine aliases that begin with a '+', to workaround an upstream bug.
Fixes #392 .
7 years ago
Daniel Shahaf
8d5afe47f7
driver: Be immune to 'alias' having been redefined.
7 years ago
Daniel Shahaf
2dce602727
driver: Be immune to weird aliases in the calling scope.
Fixes #390 .
7 years ago
Daniel Shahaf
0a9b347483
driver: Warn just once when a highlighter is missing.
The heretofore code warned once per keypress.
8 years ago
Alyssa Ross
da60234fb2
driver: Declare global variables
This caused warnings with `setopt warn_create_global`.
8 years ago
Daniel Shahaf
51614ca2c9
'main': Avoid triggering a zsh bug related to hashed commands.
This manifested in completion of the form «./foo<TAB>» where there happened to
be a program called 'foo' in $PATH.
Fixes #354 .
Closes #355 .
8 years ago
Daniel Shahaf
11c9081967
*: error messages: Fix quoting.
8 years ago
Daniel Shahaf
a3d5dfcbda
driver: Rename highlighter entry points
This updates the docs and the driver, in a manner backwards compatible with
existing highlighters. (None of the highlighters are touched by this change,
yet tests continue to pass.)
Part of issue #329 .
8 years ago
Daniel Shahaf
f91a7b885e
driver: Followup to 80148f6c840299f0980f4359ec5307ca63837dff: don't squat on the highlighters' namespace.
8 years ago
Daniel Shahaf
f3242cbd6a
driver: Followup to d711563fe1bf8fa6810bc34ac92a2fd3150290ed: actually make the driver reentrant.
Re-fixes #305 .
8 years ago
Daniel Shahaf
295d62ec88
driver: Followup to last: make the value more unique.
Part of issue #305 .
8 years ago
Daniel Shahaf
d711563fe1
driver: Make it reentrant.
This fixes an infinite recursion in zsh without zle-line-pre-redraw [≤5.2] in
the following situation:
% source zsh-syntax-highlighting.zsh
% eval "my-self-insert() { zle -M 'foobar'; ${(q)widgets[self-insert]#*:} \"\$@\" }"
% zle -N self-insert my-self-insert
% source zsh-syntax-highlighting.zsh
Fixes #305 .
8 years ago
m0viefreak
4ad311ec0a
driver: Enable highlighting during isearch under zsh≥5.3.
This patch causes a behaviour difference in the [i257] scenario:
- Before this change, the zle_highlight[isearch] is applied and z-sy-h's
highlighting isn't.
- With this change, both zle_highlight[isearch] and z-sy-h's
highlighting are applied, so «echo foo» renders the first word in green
underline (fg=green from ZSH_HIGHLIGHT_STYLES[builtin], underline from
zle_highlight[isearch]).
This patch causes the presuppositional FAQ entry added in
a8fe22d422
to be correct.
This is part of #261 , of which #288 was a spin-off.
[i257] https://github.com/zsh-users/zsh-syntax-highlighting/pull/257#issuecomment-168394665
8 years ago
m0viefreak
a8fe22d422
driver: Don't highlight in isearch
zsh version 5.2 and lower don't support ISEARCHMATCH_ACTIVE and
we are unable to re-apply zle_highlight on top. Therefore it is
impossible to see the underlined matched area.
Since that information is more important, completely disable
highlighting in isearch in that case.
To do that, we need to make sure we are actually called when
something changes in isearch.
Trumps #257 .
The FAQ entry presupposes #245 will be fixed (in time for the release) too.
8 years ago
m0viefreak
5bae621900
driver: Always bind zle-line-finish and use it instead of accept-*
Special handling for cursor imprint or partial path highlighting
is needed in more cases than accept-*. For example when accepting
a line from isearch, no accept-* widget is invoked.
The proper way is to use zle-line-finish.
Trumps #259 .
Fixes #284 .
8 years ago