fixes to C mode and other bug fix

--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-06-02 01:38:25 +00:00
parent 7fc0d762d7
commit fe7a462326
2 changed files with 5 additions and 7 deletions

View File

@ -152,12 +152,10 @@ class Buffer(object):
if w in self.windows: if w in self.windows:
self.windows.remove(w) self.windows.remove(w)
modename = w.mode.name() modename = w.mode.name()
found = False if modename in self.highlights:
for w2 in self.windows: for w2 in self.windows:
if w2.mode.name() == modename: if w2.mode.name() == modename:
found = True return
break
if not found:
del self.highlights[modename] del self.highlights[modename]
def _region_add(self, p1, p2, lines, act): def _region_add(self, p1, p2, lines, act):
move = DelMove(self, p1, p2) move = DelMove(self, p1, p2)

View File

@ -205,7 +205,7 @@ class CMake(method.shell.Exec):
class C(mode.Fundamental): class C(mode.Fundamental):
modename = 'C' modename = 'C'
extensions = ['.c'] extensions = ['.c', '.h', '.cpp']
tabbercls = CTabber tabbercls = CTabber
grammar = CGrammar grammar = CGrammar
opentokens = ('delimiter',) opentokens = ('delimiter',)