pgadmin4
pgadmin4 copied to clipboard
Query tool: Pressing [tab] does not align to next tab position
Pressing the [tab] key does not align at the next tab position, which is the actual purpose of the [tab] key.
To reproduce, activate "Use spaces?" with "Tab size" = 3 (for example). Then, in the query tool:
- Press [tab] → 3 spaces are entered
- On the next line, enter 1 character, then press [tab] → still 3 spaces are entered, but it should be 2 spaces to align at position 3
- On the next line, enter 2 characters, then press [tab] → still 3 spaces are entered, but it should be 1 space to align at position 3
-- expected:
|
1 |
12 |
123 |
1234 |
-- status quo:
|
1 |
12 |
123 |
1234 |
I am running Ubuntu Ubuntu 20.04.6 LTS. This is what "About pgAdmin4" dumps:
Version 8.6 Application Mode Desktop Current User [email protected] NW.js Version 0.77.0 Browser Chromium 114.0.5735.91 Operating System Linux-5.15.0-105-generic-x86_64-with-glibc2.29 pgAdmin Database File /home/erwin/.pgadmin/pgadmin4.db Log File /home/erwin/.pgadmin/pgadmin4.log
Originally posted by @brsa in https://github.com/pgadmin-org/pgadmin4/issues/7269#issuecomment-2095195290
In discussion with upstream - https://discuss.codemirror.net/t/pressing-tab-does-not-align-to-next-tab-position/8349
In discussion with upstream - https://discuss.codemirror.net/t/pressing-tab-does-not-align-to-next-tab-position/8349
@akshay-joshi or @adityatoshniwal As it is already somewhat time ago, I was wondering what the outcome of the discussion is. From functional perspective it seems clear. The technical issue, as posted in the discussion, is a thing I do not understand. :man_shrugging:
Tested and verified on snapshot build: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2024-11-28/ Package: arm64 Environment: macOs Sonoma 14.7.1
Did some first editing (using tab-key) and I'm happy with the solution made. It save me so much time re-aligning the code. Thank you :relieved: