jrblevin / markdown-mode

Emacs Markdown Mode
http://jblevins.org/projects/markdown-mode/
GNU General Public License v3.0
875 stars 160 forks source link

Wrong table width calculation for Unicode Combining Diacritical Marks #829

Open ceving opened 3 months ago

ceving commented 3 months ago

Expected Behavior

This is a table without COMBINING LONG STROKE OVERLAY (0336):

| X |
|---|
| X |

And this is a table with COMBINING LONG STROKE OVERLAY (0336):

| C |
|---|
| ̶X |

They should have the same width.

Actual Behavior

If you press tab in the second table the column becomes twice as wide as necessary.

| C  |
|----|
| ̶X  |

If you put many overlay characters in the table the column gets a wired width.

Steps to Reproduce

See above.

Backtrace

n/a

Software Versions

markdown-mode, version 2.7-alpha GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-02-27, modified by Debian