This repository has been archived by the owner on Apr 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
Feature/reapply syntax highlighting onColorscheme autocmd #2565
Merged
akinsho
merged 20 commits into
onivim:master
from
akinsho:feature/reapply-syntax-highlighting-oncolorscheme-autocmd
Oct 19, 2018
Merged
Feature/reapply syntax highlighting onColorscheme autocmd #2565
akinsho
merged 20 commits into
onivim:master
from
akinsho:feature/reapply-syntax-highlighting-oncolorscheme-autocmd
Oct 19, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so it appears in documentation dropdown
update affected tests
akinsho
force-pushed
the
feature/reapply-syntax-highlighting-oncolorscheme-autocmd
branch
from
October 7, 2018 10:36
6f8c0eb
to
83eccd8
Compare
Codecov Report
@@ Coverage Diff @@
## master #2565 +/- ##
=========================================
- Coverage 45.3% 45.3% -0.01%
=========================================
Files 361 361
Lines 14571 14589 +18
Branches 1912 1916 +4
=========================================
+ Hits 6601 6609 +8
- Misses 7746 7753 +7
- Partials 224 227 +3
Continue to review full report at Codecov.
|
CrossR
approved these changes
Oct 18, 2018
akinsho
deleted the
feature/reapply-syntax-highlighting-oncolorscheme-autocmd
branch
October 19, 2018 09:27
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue where setting your colorscheme e.g. as might happen when you source your vim config causes the syntax highlighting to be removed.
The issue is/was that vim re-applied the
vim
colorscheme highlights ignoring oni's highlighting and oni having cached a record of the highlighted lines believes that everything is still highlighted.This adds an action to the highlighter that is triggered on the colorscheme autocommand which causes oni to re apply its textmate based highlighting.
Outstanding
Currently we call theResolved this by only passing the visible tokens to the highlight function so only those are added to the highlight case when a page redrawshighlight
command for each line/token that requires highlighting, this means we dispatch 100s ofatomicCalls
to neovim so that when we currently trigger the colorscheme autocmd there is a block for about half a second where a user cannot interact with Oni. ---> 😢 😞