Commit Graph

63 Commits

Author SHA1 Message Date
Daniel Shahaf
cdd7f899cb brackets: Optimize the character iteration
Test case: See the first comment of issue #295.

Before:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)   14         284.67    20.33   82.84%    284.67    20.33   82.84%  _zsh_highlight_highlighter_brackets_paint
 2)   15         313.72    20.91   91.30%     26.62     1.77    7.75%  _zsh_highlight
 3)   14         318.68    22.76   92.74%      7.41     0.53    2.16%  _zsh_highlight_call_widget

After:
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)   15          57.25     3.82   45.33%     28.30     1.89   22.41%  _zsh_highlight
 2)   14          81.96     5.85   64.90%     27.02     1.93   21.40%  _zsh_highlight_call_widget
 3)   14          26.31     1.88   20.84%     26.31     1.88   20.84%  _zsh_highlight_highlighter_brackets_paint
 4)    2          10.66     5.33    8.44%      8.97     4.49    7.10%  VCS_INFO_formats
 5)    2          25.92    12.96   20.52%      7.72     3.86    6.11%  VCS_INFO_get_data_git

(That's not in my everyday configuration but in my minimal testing
setup, which runs vcs_info with the default settings.)
2020-07-14 20:19:40 +00:00
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).
2020-07-14 00:32:36 +00:00
Daniel Shahaf
0f11d80968 'main': Highlight the parentheses of array assignments as reserved words.
Fixes #585.
2020-06-08 14:23:43 +00:00
Matthew Martin
a238647df9 main: Add arithmetic substitution highlighting
Closes #607 #649 #704
2020-05-23 20:29:00 -05:00
Daniel Shahaf
f8b1470314 changelog.md: Restore vertical whitespace before section headers. 2020-05-22 04:55:17 +00:00
Daniel Shahaf
ade4b28d2d 'main': Fix issue #677, concerning multiline aliases.
The fix is to exempt such aliases from the empty commands sanity check.
2020-05-22 04:54:10 +00:00
Daniel Shahaf
8211a95421 changelog: Update through HEAD. 2020-05-22 04:44:49 +00:00
Daniel Shahaf
b253a8b86a changelog: Update through HEAD.
The great-grandparent commit, "a3ae74 'main': Fix the last commit's bug
concerning parameter elision not happening in redirects in command
position.", is not added because it's not a change with respect
to 0.7.1.
2020-05-22 03:30:49 +00:00
Daniel Shahaf
3a4b212c7d 'main': Fix regression in zsh 5.3.1 and older: all precmd hooks later than z-sy-h would be aborted.
In those versions of zsh, «[[ -o nosuchoption ]]» is regarded as
a syntax error.  In newer zsh versions, it merely returns non-zero
(specifically, it returns 3, unlike «[[ -o unsetoption ]]» which
returns 1).

Fixes #732.
Fixes #733.
2020-05-06 20:27:55 +00:00
Daniel Shahaf
0582ea1910 changelog += WARN_NESTED_VAR fixes (#727, #731) 2020-05-05 17:59:51 +00:00
Daniel Shahaf
8d32609a7b 'main': precommands += strace 2020-04-20 11:09:24 +00:00
Daniel Shahaf
aecfd61bbd 'main': Support the 'env' precommand. 2020-03-21 01:45:34 +00:00
Daniel Shahaf
8eaa41431d changelog: Update through HEAD. 2020-03-19 21:25:49 +00:00
Daniel Shahaf
1000da306a 'main': Correctly highlight '&&' and '||' inside '[[ … ]]' conditions. 2020-03-19 20:16:43 +00:00
Daniel Shahaf
b44964c545 'main': Highlight reserved words following assignments as errors.
Fixes #461.
2020-03-19 19:48:44 +00:00
Daniel Shahaf
29ca0bc6c8 'main': Highlight errors from the EQUALS option.
Fixes #430.
2020-03-19 05:59:04 +00:00
Daniel Shahaf
48dd47931a changelog: Update through HEAD. 2020-03-19 05:13:17 +00:00
Daniel Shahaf
d237a60c9b 'main': Don't highlight arithmetic expansions as command substitutions.
This is not perfect: we don't try to detect cases such as «$((ls); (ls))»,
which look like arithmetic expansions but are in fact command substitutions.

Fixes part of #607.

Introduces #704.
2020-03-17 15:05:32 +00:00
Daniel Shahaf
fb69f4ca81 'main': When the redirection operator '>&' or '<&' is followed by a positive integer, do not consider that as a filename; it's always a file descriptor.
Fixes #694.
2020-03-17 04:00:43 +00:00
Daniel Shahaf
2339ee33b9 'main': Honour the MULTIOS option when applying the 'globbing' style.
Fixes #583.
2020-03-17 03:32:58 +00:00
Daniel Shahaf
936bc251a8 'main': The optimized cmdsubst input syntax doesn't glob.
Fixes #582.
2020-03-17 03:11:52 +00:00
Daniel Shahaf
c699ce9a26 changelog: Fix markup. 2020-03-17 03:10:08 +00:00
Daniel Shahaf
9ceb7c6e7c changelog.md (0.7.0): Fix typo 2020-03-17 01:51:32 +00:00
Daniel Shahaf
3174e375f4 'main': Fix highlighting of null execs.
Fixes #676.
2020-03-16 21:50:04 +00:00
Daniel Shahaf
62e2d05f91 changelog: Update through HEAD. 2020-03-16 19:34:48 +00:00
Daniel Shahaf
e15781c900 changelog: Update through HEAD. 2020-03-16 19:26:28 +00:00
Daniel Shahaf
2331072c06 changelog: Update through HEAD. 2020-03-15 18:32:44 +00:00
Daniel Shahaf
c5878ae632 changelog: Update through HEAD. 2020-03-15 14:37:04 +00:00
Daniel Shahaf
a3c1757e47 changelog: Update through HEAD. 2020-03-13 23:13:01 +00:00
Daniel Shahaf
cb8d68d00a Update changelog for the 0.7.1 release. 2020-02-28 21:32:42 +00:00
Daniel Shahaf
04dd78cb00 Update changelog for the 0.7.0 release. (Yes, this should have been committed earlier today.) 2020-02-28 21:29:59 +00:00
Daniel Shahaf
4e92449752 changelog: Document #670 as a known issue. 2020-01-25 21:00:40 +00:00
Daniel Shahaf
b73853dd96 changelog: Document #677 as a known issue. 2020-01-24 18:40:51 +00:00
Daniel Shahaf
6a310ada5b changelog: Add three entries 2020-01-11 23:31:18 +00:00
Daniel Shahaf
c1d5790c57 changelog: Start 0.7.0's changelog. 2020-01-11 23:10:28 +00:00
Sean Wei
4fb570e104
docs: Enable Syntax Highlighting for Code Snippits 2019-01-13 16:12:41 +08:00
Daniel Shahaf
dc26731555 Tag version 0.6.0-rc1. 2017-07-31 17:31:25 +00:00
Daniel Shahaf
d1666463a7 changelog: Update through dea1fedc73. 2017-07-31 17:22:41 +00:00
Daniel Shahaf
39a6c476dd changelog: Update through 5feed23962. 2017-07-30 16:38:30 +00:00
Daniel Shahaf
5398949cb3 changelog: Update for changes pulled out of 0.5.x. 2016-10-24 11:33:40 +00:00
Daniel Shahaf
035d3eb095 Follow-up to 28d7056a7a06: Fix test expectations. 2016-10-22 17:46:42 +00:00
Daniel Shahaf
24096c2e4f changelog: Update through 28d7056a7a. 2016-10-20 00:00:58 +00:00
Daniel Shahaf
d464d3857f changelog: Write arg0 entry. 2016-10-19 09:10:24 +00:00
Daniel Shahaf
f5c44ed7a2 changelog: Markup tweak. 2016-10-18 23:59:32 +00:00
Daniel Shahaf
2335986a39 changelog: Add the last few entries. One remains as a TODO. 2016-10-18 23:54:52 +00:00
Daniel Shahaf
f3d0e141fd changelog: Review. 2016-10-18 22:53:17 +00:00
Daniel Shahaf
3c90a673f6 changelog: Update through 0020f592c1. 2016-10-18 22:53:17 +00:00
Daniel Shahaf
773d60c833 changelog: Update through d37c55c788. 2016-10-18 22:53:17 +00:00
Daniel Shahaf
2dff6e54ed changelog: Copyedit.
- Move an entry to another section.
- Fix commit hash width.
- Add missing punctuation.
2016-10-18 22:52:36 +00:00
Daniel Shahaf
0020f592c1 changelog: Update through cef49752fd. 2016-10-18 02:28:40 +00:00