moved spelling error rendering
@@ -1383,16 +1383,6 @@ class TextBuffer(BackingTextBuffer):
if length:
col = k-self.scrollCol
window.addStr(i, col, line, color)
- # Highlight keywords.
- keywordsColor = node.grammar.get('keywordsColor', defaultColor)
- for found in node.grammar['keywordsRe'].finditer(line):
- f = found.regs[0]
- window.addStr(i, col+f[0], line[f[0]:f[1]], keywordsColor)
- # Highlight specials.
- keywordsColor = node.grammar.get('specialsColor', defaultColor)
- for found in node.grammar['specialsRe'].finditer(line):
- f = found.regs[0]
- window.addStr(i, col+f[0], line[f[0]:f[1]], keywordsColor)
if 1:
# Highlight spelling errors
colors = [131, 231]
@@ -1405,6 +1395,16 @@ class TextBuffer(BackingTextBuffer):
window.addStr(i, col+reg[0], word,
curses.color_pair(colors[color%2]))
color += 1
+ # Highlight keywords.
+ keywordsColor = node.grammar.get('keywordsColor', defaultColor)
+ for found in node.grammar['keywordsRe'].finditer(line):
+ f = found.regs[0]
+ window.addStr(i, col+f[0], line[f[0]:f[1]], keywordsColor)
+ # Highlight specials.
+ keywordsColor = node.grammar.get('specialsColor', defaultColor)
+ for found in node.grammar['specialsRe'].finditer(line):
+ f = found.regs[0]
+ window.addStr(i, col+f[0], line[f[0]:f[1]], keywordsColor)
k += length
else:
window.addStr(i, k-self.scrollCol+length, ' '*(maxx-k-length),
