branch : pmacs2
This commit is contained in:
moculus 2009-02-14 14:50:25 +00:00
parent a096703778
commit 2e37f0e0dd
3 changed files with 16 additions and 6 deletions

3
BUGS
View File

@ -1,5 +1,8 @@
=== OUSTANDING BUGS ===
2009/02/14:
slot/window width sync issues (try editing mode files for awhile)
2009/01/28:
completion-buffer needs to save window, instead of just saving
the buffer. otherwise you lose window-customization (e.g. margins, headers,

View File

@ -3,6 +3,12 @@ from lex import Grammar, PatternRule, NocasePatternRule, RegionRule, NocaseRegio
from mode.python import StringGrammar1, StringGrammar2
from method import CommentRegion, UncommentRegion
class BitStringGrammar(Grammar):
rules = [PatternRule(r'data', r'[01]+')]
class HexStringGrammar(Grammar):
rules = [NocasePatternRule(r'data', r'[0-9a-f]+')]
class PlPgSqlGrammar(Grammar):
rules = [
PatternRule(r'spaces', r' +'),
@ -18,7 +24,12 @@ class PlPgSqlGrammar(Grammar):
NocasePatternRule(r'pseudokeyword', r'(?:returns|language|right join|left join|inner join|outer join|join|where|unknown|null|true|false|into|values|as|from|order by|next|asc|desc|limit|distinct|cascade|alias for|using|on)(?![A-Za-z0-9_])'),
NocasePatternRule(r'sql_type', r'(?:void|row|serial|varchar|float|integer|int|text|timestamptz|timestamp|datetz|date|timetz|time|boolean|bool|record|row)(?![A-Za-z0-9_])'),
PatternRule(r'sql_builtin', r'(?:nextval|current_timestamp|current_time|current_date)(?![A-Za-z0-9_])'),
PatternRule(r'number', r'[0-9]+(?:e[+-]?[0-9]+)?'),
PatternRule(r'number', r'[0-9]+\.(?:[0-9]+)?(?:e[+-]?[0-9]+)?'),
PatternRule(r'number', r'\.[0-9]+(?:e[+-]?[0-9]+)'),
RegionRule(r'string', "''", StringGrammar1, "''"),
RegionRule(r'string', "B'", BitStringGrammar, "'"),
RegionRule(r'string', "X'", HexStringGrammar, "'"),
RegionRule(r'sql_quoted', '"', StringGrammar2, '"'),
PatternRule(r'sql_variable', r'\$[1-9][0-9]*'),
PatternRule(r'sql_bareword', r'[A-Za-z0-9_]+'),
@ -46,12 +57,6 @@ class FunctionGrammar(Grammar):
PatternRule(r'eol', r'\n'),
]
class BitStringGrammar(Grammar):
rules = [PatternRule(r'data', r'[01]+')]
class HexStringGrammar(Grammar):
rules = [NocasePatternRule(r'data', r'[0-9a-f]+')]
class SqlGrammar(Grammar):
rules = [
PatternRule(r'spaces', r' +'),

View File

@ -223,6 +223,7 @@ class Window(object):
counter = 0
while counter < self.height / 2:
if x > self.width:
d = x % self.width
x -= self.width
elif y > 0:
y -= 1
@ -231,6 +232,7 @@ class Window(object):
(x, y) = (0, 0)
break
counter += 1
x -= (x % self.width)
# make sure we aren't "centering" on the end of the file (where half the
# screen is empty). that is, unless that's what the user wants