Skip to content

Commit f6b7e2a

Browse files
pinn3j-bennet
authored andcommitted
Restore cursor shape behaviour for Emacs mode (dbcli#1610)
* Restore cursor shape behaviour for Emacs mode * Fix bad merge * Add header --------- Co-authored-by: Irina Truong <637013+j-bennet@users.noreply.github.com>
1 parent e50ee07 commit f6b7e2a

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

changelog.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Unreleased - upstream: 4.5.0
33

44
Bug fixes:
55
----------
6+
* Restore cursor shape behaviour for Emacs mode: ``ModalCursorShapeConfig`` is
7+
only applied when vi mode is on, so Emacs mode keeps the terminal's own
8+
cursor shape (upstream #1610, cherry-picked).
69
* CLI connection flags now also override a ``key=value`` conninfo string
710
(``pgcli "host=... user=a" -U b``), completing the 4.5.7 fix that covered
811
``--dsn`` aliases and URIs: this third form still dropped ``-U``/``-h``/``-p``

pgcli/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,7 @@ def get_continuation(width, line_number, is_soft_wrap):
15481548
enable_suspend=True,
15491549
editing_mode=EditingMode.VI if self.vi_mode else EditingMode.EMACS,
15501550
search_ignore_case=True,
1551-
cursor=ModalCursorShapeConfig(),
1551+
cursor=ModalCursorShapeConfig() if self.vi_mode else None,
15521552
)
15531553

15541554
return prompt_app

0 commit comments

Comments
 (0)