From c09a3f0e4da01033f5fa6e5f3df4eba6e4bc1812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Mon, 23 Jan 2023 15:55:28 +0100 Subject: [PATCH] Fix crash on active view being a HtmlSheet (#155) --- README.md | 2 +- trailing_spaces.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8254ae9..68bcc50 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ A [Sublime Text](http://www.sublimetext.com) plugin that allows you to… - [Trim On Save](#trim-on-save) - [Save After Trim](#save-after-trim) - [Live Matching vs On-demand Matching](#live-matching-vs-on-demand-matching) - - [Ignore Syntax](#ignore-syntax) + - [Ignore Scope](#ignore-scope) - [For power-users only!](#for-power-users-only) - [Disabled for large files](#disabled-for-large-files) - [The matching pattern](#the-matching-pattern) diff --git a/trailing_spaces.py b/trailing_spaces.py index 4ab08df..fc218f8 100644 --- a/trailing_spaces.py +++ b/trailing_spaces.py @@ -491,7 +491,10 @@ def is_view_visible(self, view): # see if this view is visible in its group group = window.get_view_index(view)[0] if group != -1: - return view.id() == window.active_view_in_group(group).id() + active_view_in_group = window.active_view_in_group(group) + # won't be present if a html sheet is active + if active_view_in_group: + return view.id() == active_view_in_group.id() # check if this view is the active panel active_panel = window.active_panel() or ""