Skip to content

Padding is ignoring character width #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ngicks opened this issue Mar 26, 2025 · 0 comments
Open

Padding is ignoring character width #324

ngicks opened this issue Mar 26, 2025 · 0 comments

Comments

@ngicks
Copy link

ngicks commented Mar 26, 2025

Hi. I found this plugin pretty useful but it padds incorrectly when columns contain character whose width is 2.

$ sqlite3
SQLite version 3.45.1 2024-01-30 16:01:20
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open sample.sqlite3
sqlite> CREATE TABLE sample (foo TEXT, bar TEXT, baz TEXT, PRIMARY KEY (foo));                                                                                                                                      
sqlite> INSERT INTO sample (foo, bar, baz) VALUES ('yay', 'yayyay', 'ya');                                                                                                                                          
sqlite> INSERT INTO sample (foo, bar, baz) VALUES ('いえい', 'いえいいえい', 'いえ');                                                                                                                               
sqlite> SELECT * FROM sample;
yay|yayyay|ya
いえい|いえいいえい|いえ
sqlite>

and then open connection to sample.sqlite3 and save on List query displays;

1 foo  bar     baz                                                                                        
2 ---  ------  ---                                                                                        
3 yay  yayyay  ya                                                                                         
4 いえい  いえいいえい  いえ

I'm not sure whether the fix should go in tpope/vim-dadbod or here.

Other plugins like MeanderingProgrammer/render-markdown.nvim redner well with japanese which indicates they have logic for those char width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant