Skip to content

:SemanticHightlight does not set b:semanticOn, messes up :SemanticHighlightToggle #78

@magv

Description

@magv

Hi, folks. If you first run :SemanticHightlight to enable the highlight, and then :SemanticHighlightToggle, it will not toggle (as it disable) the highlight. It will do so from the second try though.

This is because :SemanticHightlightToggle relies on b:sematicOn being set to determine if the highlight is on or not, and :SemanticHightlight (being a shortcut for s:semHighlight) does not set it.

I see two solutions here:

  1. Make :SemanticHightlight a shortcut for s:enableHighlight in stead of s:semHighlight, as the former does in fact set b:sematicOn. It seems that s:enableHighlight clears the cache in the addition to setting b:sematicOn, and I don't know if this is desired or not.
  2. Make s:semHighlight set b:sematicOn itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions