summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Slenders <jonathan@slenders.be>2016-03-06 15:47:48 +0100
committerJonathan Slenders <jonathan@slenders.be>2016-03-14 21:40:58 +0100
commit84ecdb10146c340b54bc19b6ea3eff9a814da622 (patch)
tree708a46a1fdb4530b6026b39aca79c2948ba23f5f
parentccf3693be62dd8a79ced19ed9d69f0708d2b3d6f (diff)
Upgrade to prompt_toolkit 0.60.
-rwxr-xr-xpgcli/main.py4
-rw-r--r--setup.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index 29315d72..25d57a11 100755
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -410,6 +410,9 @@ class PGCli(object):
def prompt_tokens(_):
return [(Token.Prompt, '%s> ' % self.pgexecute.dbname)]
+ def get_continuation_tokens(cli, width):
+ return [(Token.Continuation, '.' * (width - 1) + ' ')]
+
get_toolbar_tokens = create_toolbar_tokens_func(
lambda: self.vi_mode, self.completion_refresher.is_refreshing)
@@ -417,6 +420,7 @@ class PGCli(object):
lexer=PygmentsLexer(PostgresLexer),
reserve_space_for_menu=4,
get_prompt_tokens=prompt_tokens,
+ get_continuation_tokens=get_continuation_tokens,
get_bottom_toolbar_tokens=get_toolbar_tokens,
display_completions_in_columns=self.wider_completion_menu,
multiline=True,
diff --git a/setup.py b/setup.py
index 9ed0fd1d..6ceb61a8 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ install_requirements = [
'pgspecial>=1.1.0',
'click >= 4.1',
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
- 'prompt_toolkit==0.57',
+ 'prompt_toolkit==0.60',
'psycopg2 >= 2.5.4',
'sqlparse == 0.1.16',
'configobj >= 5.0.6',