SublimeText / TrailingSpaces

Highlight trailing spaces and delete them in a flash.
MIT License
896 stars 94 forks source link

TypeError unsupported operand type(s) for +: 'NoneType' and 'str' #128

Closed reversefold closed 4 years ago

reversefold commented 4 years ago

In console with ST 3.2.2 build 3211 with trailing spaces 2020.02.05.17.36.05

reloading plugin TrailingSpaces.trailing_spaces
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 214, in load_module
    el.on_activated(v)
  File "/Users/jpatrin/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package/trailing_spaces.py", line 423, in on_activated
    match_trailing_spaces(view)
  File "/Users/jpatrin/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package/trailing_spaces.py", line 131, in match_trailing_spaces
    (matched, highlightable) = find_trailing_spaces(view)
  File "/Users/jpatrin/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package/trailing_spaces.py", line 94, in find_trailing_spaces
    regexp = ts_settings.get("trailing_spaces_regexp") + "$"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
michaelblyons commented 4 years ago

I believe there's an issue wherein the settings are not reloaded gracefully when the plugin is updated, and ST wants to be restarted. I'll try to look into it when I get a chance.

rchl commented 4 years ago

We should be handling this properly in latest version (v1.3.2).