Skip to content

Commit

Permalink
Merge fd4334c into 980778c
Browse files Browse the repository at this point in the history
  • Loading branch information
autophagy committed Feb 23, 2017
2 parents 980778c + fd4334c commit 605a16c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/crate/crash/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def __call__(self, buffer):
return

current_line = buffer.document.text

if current_line.startswith('\\'):
return

cursor_position = buffer.document.cursor_position

if self.last_changed and self.is_prefix(current_line[:cursor_position].lower(), self.last_changed.lower()):
Expand Down
4 changes: 4 additions & 0 deletions src/crate/crash/test_repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def test_capitalize(self):
self.capitalizer(buffer)
self.assertEqual(u'CREATE TABLE test\n(a BOOLEAN, b STRING, c INTEGER)', buffer.text)

text = u'\select dynamic'
buffer.set_document(Document(text, len(text)))
self.capitalizer(buffer)
self.assertEqual(u'\select dynamic', buffer.text)

def test_undo_capitalize(self):
buffer = Buffer()
Expand Down

0 comments on commit 605a16c

Please sign in to comment.