pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix \watch's interaction with libedit on ^C.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:03 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/21267b64771925c154a767b1f261b5501d7bb26f

Modified Files
--------------
src/bin/psql/command.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:03 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:03 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/31b485f883a7db27319d4ea8a724151c21db7bb8

Modified Files
--------------
src/bin/psql/command.c | 12 ++++++++++++
1 file changed, 12 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:04 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ab7fef0acfbd33331b4d3a000d501454fdcee8f2

Modified Files
--------------
src/bin/psql/command.c | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:04 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e5b5b4448ce0981a7a89a8c43df77d71bfa9cc96

Modified Files
--------------
src/bin/psql/command.c | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:04 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/09224a35cdaa06f047d2ae1e25595002f27ce303

Modified Files
--------------
src/bin/psql/command.c | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:04 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/21ed12b14a3221f1dce6c56b8ca641853adac386

Modified Files
--------------
src/bin/psql/command.c | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix \watch's interaction with libedit on ^C.
@ 2022-07-10 05:05 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2022-07-10 05:05 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix \watch's interaction with libedit on ^C.

When you hit ^C, the terminal driver in Unix-like systems echoes "^C" as
well as sending an interrupt signal (depending on stty settings).  At
least libedit (but maybe also libreadline) is then confused about the
current cursor location, and corrupts the display if you try to scroll
back.  Fix, by moving to a new line before the next prompt is displayed.

Back-patch to all supported released.

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/3278793.1626198638%40sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7c5953b7b5dc2b1c5546c5b8b8b29785d46f4e8e

Modified Files
--------------
src/bin/psql/command.c | 8 ++++++++
1 file changed, 8 insertions(+)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2022-07-10 05:05 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10 05:03 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>
2022-07-10 05:03 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>
2022-07-10 05:04 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>
2022-07-10 05:04 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>
2022-07-10 05:04 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>
2022-07-10 05:04 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>
2022-07-10 05:05 pgsql: Fix \watch's interaction with libedit on ^C. Thomas Munro <tmunro@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox