|
37 | 37 | def plugin_loaded(): |
38 | 38 | global ts_settings_filename, ts_settings, trailing_spaces_live_matching |
39 | 39 | global current_highlighting_scope, trim_modified_lines_only, startup_queue |
40 | | - global DEFAULT_COLOR_SCOPE_NAME, on_disk, trailing_spaces_syntax_ignore |
| 40 | + global DEFAULT_COLOR_SCOPE_NAME, trailing_spaces_syntax_ignore |
41 | 41 |
|
42 | 42 | ts_settings = sublime.load_settings(ts_settings_filename) |
43 | 43 | trailing_spaces_live_matching = bool(ts_settings.get("trailing_spaces_enabled", |
@@ -414,12 +414,18 @@ def on_selection_modified(self, view): |
414 | 414 | match_trailing_spaces(view) |
415 | 415 |
|
416 | 416 | def on_activated(self, view): |
417 | | - self.freeze_last_version(view) |
| 417 | + global trim_modified_lines_only |
| 418 | + if trim_modified_lines_only: |
| 419 | + self.freeze_last_version(view) |
| 420 | + |
418 | 421 | if trailing_spaces_live_matching: |
419 | 422 | match_trailing_spaces(view) |
420 | 423 |
|
421 | 424 | def on_pre_save(self, view): |
422 | | - self.freeze_last_version(view) |
| 425 | + global trim_modified_lines_only |
| 426 | + if trim_modified_lines_only: |
| 427 | + self.freeze_last_version(view) |
| 428 | + |
423 | 429 | if ts_settings.get("trailing_spaces_trim_on_save"): |
424 | 430 | view.run_command("delete_trailing_spaces") |
425 | 431 |
|
|
0 commit comments