possan / sublime_unicode_nbsp

A sublime text plugin that highlights unicode characters such as non breakable spaces and others that break compilers/linters
30 stars 17 forks source link

Improvements: .gitignore, settings file, bug fix #12

Open michaelhogg opened 9 years ago

michaelhogg commented 9 years ago

Many thanks for creating this great plugin Possan :)

I've made a few improvements:

Kristinita commented 8 years ago

@michaelhogg,

Summary

Not worked your improvement branch for me.

Expected behavior

Successful highlight Unicode symbols.

Actual behavior

Traceback (most recent call last):
  File "E:\Sublime Text 3\sublime_plugin.py", line 389, in run_callback
    expr()
  File "E:\Sublime Text 3\sublime_plugin.py", line 428, in <lambda>
    run_callback('on_load', callback, lambda: callback.on_load(v))
  File "E:\Sublime Text 3\Data\Packages\sublime_unicode_nbsp\sublime_unicode_nbsp.py", line 82, in on_load
    self.defered_update(view)
  File "E:\Sublime Text 3\Data\Packages\sublime_unicode_nbsp\sublime_unicode_nbsp.py", line 76, in defered_update
    func()
  File "E:\Sublime Text 3\Data\Packages\sublime_unicode_nbsp\sublime_unicode_nbsp.py", line 71, in func
    self.update(view)
  File "E:\Sublime Text 3\Data\Packages\sublime_unicode_nbsp\sublime_unicode_nbsp.py", line 137, in update
    view.add_regions('HighlightUnicodeJunk', regions, color_name, icon, flags)
  File "E:\Sublime Text 3\sublime.py", line 1031, in add_regions
    sublime_api.view_add_regions(self.view_id, key, regions, scope, icon, flags)
TypeError: String required

Steps to reproduce

The problem is reproduced for me in a version of Sublime Text without plugins and user settings.

In my %Packages% folder I run command git clone -b improvements https://github.com/michaelhogg/sublime_unicode_nbsp.git → I restart my Sublime Text → I get stack trace. Unicode symbols not highlight for me.

Do not offer

master branch.

  1. I don't need plugin, when highlight all Unicode symbols. I want plugin, highlight zero-width characters, line separators and so on. I have a lot of time working with Cyrillic characters, so your plugin in master branch highlight most of my characters.
  2. Your fork in master branch largely duplicates highlight-dodgy-chars plugin.

Environment

Operating system and version: Windows 10.0.14393 Sublime Text: Build 3126

Thanks.