diff --git a/COPYING b/COPYING index aa4af1c..0932b1d 100644 --- a/COPYING +++ b/COPYING @@ -6,3 +6,8 @@ authore are listed here: https://github.com/mozilla/pdf.js/blob/master/AUTHORS The icons is based on the work from Tango Project (http://tango.freedesktop.org, download link: http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz under Public Domain. staff: http://tango.freedesktop.org/The_People). Part of the icons are modified by Yoxem Chen. + +some code parts are from Infobiotics Dashboard (for Infobiotics Workbench) +Copyright 2008, 2009, 2010 Jonathan Blakes, jvb@cs.nott.ac.uk +Released under GNU GPL version 3. +url: https://github.com/jvb/infobiotics-dashboard/ \ No newline at end of file diff --git a/main.py b/main.py index 0521bbc..cc79feb 100755 --- a/main.py +++ b/main.py @@ -216,6 +216,8 @@ class ClochurLexer(QsciLexerCustom): self.PRIMARY = ['define', 'let' , '#t', '#f', 'lambda', '@', 'cond', 'if', 'docu'] + #self.rainbow_state = 0 + def language(self): return "Clochur" @@ -301,9 +303,9 @@ class ClochurLexer(QsciLexerCustom): i = 0 if index > 0: - pos = SCI(QsciScintilla.SCI_GETLINEENDPOSITION, index - 1) - rainbow_state = SCI(QsciScintilla.SCI_GETSTYLEAT, pos) + 0 - print(rainbow_state) + # pos = SCI(QsciScintilla.SCI_GETLINEENDPOSITION, index - 1) + rainbow_state = SCI(QsciScintilla.SCI_GETLINESTATE, index - 1) + # print(rainbow_state) for item in line_utf8_splitted_len_pair: @@ -320,9 +322,9 @@ class ClochurLexer(QsciLexerCustom): #parenthesis: rainbow mode elif item["str"] == "[": new_state = getattr(self, "Rainbow" + str(rainbow_state)) - rainbow_state += 1 + rainbow_state = (rainbow_state + 1) % 7 elif item["str"] == "]": - rainbow_state -= 1 + rainbow_state = (rainbow_state - 1) % 7 new_state = getattr(self, "Rainbow" + str(rainbow_state)) else: pass @@ -333,6 +335,8 @@ class ClochurLexer(QsciLexerCustom): if new_state != self.Comment: new_state = self.Default + + SCI(QsciScintilla.SCI_SETLINESTATE, index, rainbow_state)