forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd1c866e
committed
Make psql redisplay the query buffer after \e.
Up to now, whatever you'd edited was put back into the query bufferbut not redisplayed, which is less than user-friendly. But we canimprove that just by printing the text along with a prompt, if weenforce that the editing result ends with a newline (which ittypically would anyway). You then continue typing more lines ifyou want, or you can type ";" or do \g or \r or another \e.This is intentionally divorced from readline's processing,for simplicity and so that it works the same with or withoutreadline enabled. We discussed possibly integrating thingsmore closely with readline; but that seems difficult, uncertainlyportable across different readline and libedit versions, andof limited real benefit anyway. Let's try the simple way andsee if it's good enough.Patch by me, thanks to Fabien Coelho and Laurenz Albe for reviewDiscussion:https://postgr.es/m/13192.1572318028@sss.pgh.pa.us1 parent73b06cf commitd1c866e
File tree
3 files changed
+33
-6
lines changed- doc/src/sgml/ref
- src/bin/psql
3 files changed
+33
-6
lines changedLines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1831 | 1831 |
| |
1832 | 1832 |
| |
1833 | 1833 |
| |
1834 |
| - | |
1835 |
| - | |
1836 |
| - | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
1837 | 1841 |
| |
1838 | 1842 |
| |
1839 | 1843 |
| |
| |||
1893 | 1897 |
| |
1894 | 1898 |
| |
1895 | 1899 |
| |
1896 |
| - | |
| 1900 | + | |
| 1901 | + | |
1897 | 1902 |
| |
1898 | 1903 |
| |
1899 | 1904 |
| |
| |||
1969 | 1974 |
| |
1970 | 1975 |
| |
1971 | 1976 |
| |
1972 |
| - | |
| 1977 | + | |
| 1978 | + | |
1973 | 1979 |
| |
1974 | 1980 |
| |
1975 | 1981 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3508 | 3508 |
| |
3509 | 3509 |
| |
3510 | 3510 |
| |
3511 |
| - | |
| 3511 | + | |
| 3512 | + | |
3512 | 3513 |
| |
3513 | 3514 |
| |
3514 | 3515 |
| |
|
Lines changed: 20 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
| 50 | + | |
50 | 51 |
| |
51 | 52 |
| |
52 | 53 |
| |
| |||
118 | 119 |
| |
119 | 120 |
| |
120 | 121 |
| |
| 122 | + | |
121 | 123 |
| |
122 | 124 |
| |
123 | 125 |
| |
| |||
152 | 154 |
| |
153 | 155 |
| |
154 | 156 |
| |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
155 | 169 |
| |
156 | 170 |
| |
157 | 171 |
| |
| |||
518 | 532 |
| |
519 | 533 |
| |
520 | 534 |
| |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
521 | 539 |
| |
522 | 540 |
| |
523 | 541 |
| |
| |||
529 | 547 |
| |
530 | 548 |
| |
531 | 549 |
| |
| 550 | + | |
| 551 | + | |
532 | 552 |
| |
533 | 553 |
| |
534 | 554 |
| |
|
0 commit comments
Comments
(0)