Wrap on typing and Table format do not take actual character widths into account for multi-byte characters
See original GitHub issuecopied from #219
Table formatting produces unexpected results when typing multibyte characters. Would you have any plans to fix it? In case it is difficult to handle multibyes, it would be nice if we could disable auto formatting feature for table.
Environment:
- Ubuntu 14.04 LTS
- IntelliJ IDEA 2016.1
- Build #IU-145.970, built on April 18, 2016
- JRE: 1.8.0_76-release-b47 amd64
- JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
- Multimarkdown: 1.4.10 (Enhanced edition)
Expected result:
| マルチバイト |
|:-----------|
| Cell |
| Alphabet |
|:-----------|
| マルチバイト |
Actual result:
| マルチバイト |
|:-------|
| Cell |
| Alphabet |
|:---------|
| マルチバイト |
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Wrap text in a cell - Microsoft Support
Microsoft Excel can wrap text so it appears on multiple lines in a cell. You can format the cell so the text wraps...
Read more >nchar: Count the Number of Characters (or Bytes or Width)
The default for nchar() , NA , means to use keepNA = TRUE unless type is "width" . Details. The 'size' of a...
Read more >Terminal prompt not wrapping correctly - Unix Stack Exchange
The prompt is believed to be 8 characters and not 1. As such if terminal window is 20 columns, after typing 12 characters,...
Read more >Wrapping and breaking text - CSS: Cascading Style Sheets
This guide explains the various ways in which overflowing text can be managed in CSS.
Read more >wordwrap - Manual - PHP
If the cut_long_words is set to true , the string is always wrapped at or before ... When false the function does not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cuiguojie, pre-releas EAP version with proper wrapping and table alignment based on character widths is now available: https://github.com/vsch/idea-multimarkdown/raw/master/dist/idea-multimarkdown.1.6.3.92.zip
Table column width matching is done +/- 1/2 space width of the display font, cumulative for the line.
Please let me know if you encounter any issues.
Here is the result of wrapping and formatting tables for source given below:
Source:
@cuiguojie, just verified and the IDE does generate typing handler calls when multiple characters are used for a word.
It was the plugin code that detected an unexpected difference between Psi and Document length that was skipping auto-format. I changed the code to allow negative difference caused by multi-char to single word changes when a character is typed to account for this condition.
https://github.com/vsch/idea-multimarkdown/raw/master/dist/idea-multimarkdown.1.6.3.102.zip