[gedit-latex: 1/2] Fixed style not set (was breaking compilation of Latex -> pdf)



commit 155330228c3fbf527a036d5412830e66a1f25b92
Author: Matteo Marchiori <matteo marchiori97 gmail com>
Date:   Sun Mar 17 15:58:20 2019 +0000

    Fixed style not set (was breaking compilation of Latex -> pdf)

 latex/latex/editor.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/latex/latex/editor.py b/latex/latex/editor.py
index b1655ce..b481659 100644
--- a/latex/latex/editor.py
+++ b/latex/latex/editor.py
@@ -72,7 +72,10 @@ class LaTeXEditor(Editor, IIssueHandler):
 
         style_scheme = self._text_buffer.get_style_scheme()
         w_style = style_scheme.get_style('def:warning')
-        w_color = w_style.get_properties('background')[0]
+        if w_style:
+            w_color = w_style.get_properties('background')[0]
+        else:
+            w_color = None
         self.register_marker_type("latex-warning", w_color)
 
         e_style = style_scheme.get_style('def:error')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]