Matthew Martin
9bb3db7fd2
driver: Use stable zsh release in is-at-least calls
il y a 9 mois
Matthew Martin
d59ce0fbd0
driver: Be resilient to KSH_ARRAYS being set in the calling scope
il y a 10 mois
Matthew Martin
dd0cf649d1
*: Use https in URLs
il y a 11 mois
Daniel Shahaf
0ddb1a8d51
driver: Bump the in-development is-at-least checks so they return false on zsh 5.8.1, released yesterday.
Fixes #856
Fixes #857
il y a 2 ans
Daniel Shahaf
b392045e6f
driver: Simplify grammar of a comment. No functional change.
il y a 2 ans
Daniel Kuettel
c7caf57ca8
check KEYS_QUEUED_COUNT and PENDING to skip parsing when pasting
il y a 3 ans
Daniel Shahaf
3944a44ffe
driver: Fix a version number check to work around a bug in the zsh version whereunder the check should return false.
The bug is as follows:
% zsh-5.8 -fc 'autoload is-at-least; is-at-least 5.8.0.2 && echo yes || echo no'
yes
% zsh-5.8 -fc 'autoload is-at-least; is-at-least 5.8.0.2 $ZSH_VERSION && echo yes || echo no'
yes
This commit deploys the following workaround:
% zsh-5.8 -fc 'autoload is-at-least; is-at-least 5.8.0.2 $ZSH_VERSION.0.0 && echo yes || echo no'
no
Fixes #756 .
il y a 4 ans
Daniel Shahaf
cb33cc0081
On the feature/redrawhook branch, change the detection of the 'memo=' feature to avoid a catch-22.
il y a 4 ans
Daniel Shahaf
d62baa50f4
Revert "driver: Move the initialization of $zsh_highlight__memo_feature out of the entry point function."
This reverts commit 8a1bd7c8b6
.
The detection only works correctly from a widget function, so the change
was wrong: it caused zsh_highlight__memo_feature to be set to false
every time.
il y a 4 ans
Daniel Shahaf
59cb9a560d
driver: Make the redrawhook codepath conditional upon the memo= feature.
Fixes #579 (zsh-autosuggestions interoperability).
Fixes #735 (ditto).
See https://github.com/zsh-users/zsh-syntax-highlighting/issues/579#issuecomment-650126055
See https://github.com/zsh-users/zsh-autosuggestions/issues/529#issuecomment-650481227
il y a 4 ans
Daniel Shahaf
8a1bd7c8b6
driver: Move the initialization of $zsh_highlight__memo_feature out of the entry point function.
This is needed for feature/redrawhook to be able to use it.
il y a 4 ans
Daniel Shahaf
810c2dcede
Use the new, unreleased zsh 'memo=' feature to remove only our own entries from $region_highlight.
Fixes #418 (interoperability issue with other plugins).
il y a 4 ans
Daniel Shahaf
075c852924
driver: Stop re-declaring $region_highlight. It's unneeded.
il y a 4 ans
Daniel Shahaf
b08d508cd8
driver: Fix a bug that prevented subsequent, third-party zle-line-pre-redraw hooks from running.
Without this patch, `_zsh_highlight` was invoked by add-zle-hook-widget
with `$?` being non-zero (see add-zle-hook-widget:48-52). Since
`_zsh_highlight` preserves `$?` from its caller's point of view,
add-zle-hook-widget saw a non-zero exit code from `_zsh_highlight` and
did not run any the remaining zle-line-pre-redraw hooks.
See https://github.com/zsh-users/zsh-syntax-highlighting/issues/579#issuecomment-623576907 .
il y a 4 ans
Daniel Shahaf
ccb1da4ae8
Bump copyright years.
il y a 4 ans
Daniel Shahaf
96eb2e31a1
driver: Fix "_zsh_highlight:3: read-only variable: ret" warnings when POSIX_BUILTINS is set.
Fixes #719 .
Cf. #688 .
il y a 4 ans
Daniel Shahaf
f563780236
driver: Simplify initialization of $zsyh_user_options in the fallback codepath.
il y a 4 ans
Daniel Shahaf
b8c93afd34
driver: Make sure we don't change the return value in a called function.
il y a 4 ans
Daniel Shahaf
5d139fcd94
Fix typos in comments.
il y a 4 ans
Austin Traver
b00be5f741
driver: Be resilient to KSH_ARRAYS being set in the calling scope
The «emulate» call isn't sufficient, since these lines are parsed before
it takes effect.
Fixes #689 (née #622 ).
See also #688 for preventing these gymnastics from being needed in the
first place.
See also https://github.com/junegunn/fzf/pull/1924 for an inter-plugin
interaction that this probably fixes.
il y a 4 ans
Daniel Shahaf
4a043b4d15
noop: Whitespace changes only.
./.editorconfig is already set correctly.
il y a 4 ans
Oliver Kiddle
be3882aeb0
driver: adjust region end for vi command mode
il y a 5 ans
Matthew Martin
b55832c5f8
main: Drop X_ from X_ZSH_HIGHLIGHT_DIRS_BLACKLIST
il y a 5 ans
Matthew Martin
972ad197c1
driver: Disable BASH_REMATCH
Fixes #612 .
il y a 5 ans
dana
55f846c673
driver: Avoid warn_create_global warnings
il y a 5 ans
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.
il y a 6 ans
Daniel Shahaf
56ba7f082d
driver: Clarify comment. No functional change.
il y a 6 ans
Matthew Martin
2cbb3fb24e
driver: Allow for -U in autoloaded function definition
il y a 6 ans
Matthew Martin
f265ef0b9a
driver: Use idiomatic module check
il y a 6 ans
Daniel Shahaf
d0fb0df4ff
driver: Make the shadowing $WIDGET read only.
il y a 6 ans
Daniel Shahaf
f665eec230
driver: Avoid a fork in the common case.
Found-by: Matthew Martin
il y a 6 ans
Daniel Shahaf
b5249f17ab
driver: Rewrite without a state variable
Suggested-by: m0viefreak
il y a 8 ans
Daniel Shahaf
d2594c1157
noop: Make a whitespace-only change to reduce noise in the next commit.
il y a 8 ans
Daniel Shahaf
d4ab7e51d2
redo _zsh_highlight__function_callable_p
il y a 8 ans
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).
il y a 8 ans
Daniel Shahaf
30c6e70394
driver: Pass zle-line-finish arguments on to _zsh_highlight.
(Currently a noop)
il y a 8 ans
Daniel Shahaf
74a27de70d
driver: Hook zle-line-finish.
Compare issue #288 .
il y a 8 ans
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.
il y a 8 ans
Daniel Shahaf
aed99f6a3e
wrappers: Reimplement using Mikachu's zle-line-pre-redraw hook (workers/36650).
il y a 9 ans
Julien Nicoulaud
3a7ddcda0b
#535 : locally enable BARE_GLOB_QUAL option when loading highlighters
il y a 6 ans
Adam Johnson
42d396d819
driver: Exclude yank-pop again ( #183 ).
il y a 6 ans
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
il y a 6 ans
Matthew Martin
2c0c75a8ee
driver, main: Add -z to autoload calls
il y a 6 ans
Matthew Martin
ff85c7e01b
driver: Do not highlight newlines or past BUFFER for zle standout
il y a 6 ans
Matthew Martin
84f0507cf6
driver: Replace eval with ${(P)
il y a 6 ans
Matthew Martin
b07ada1255
driver: Run under emulate -L zsh and add zsyh_user_options
il y a 6 ans
Daniel Shahaf
e4352f98bb
driver: Revert previous commit, unbreaking the build on zsh<5.0.8.
il y a 6 ans
Daniel Shahaf
9d9e9662cf
driver: Correctly escape assoc key pattern
il y a 6 ans
Matthew Martin
a9ce931439
Default possibly unset variables to empty
il y a 6 ans
Daniel Shahaf
a2a899b41b
driver: _zsh_highlight_bind_widgets: Be resilient to NO_UNSET being set in the calling scope.
Fixes #449 .
il y a 6 ans