Commit activity
Last 12 weeks · 0 commits
Community health
2 of 6 standards met
Recent PRs & issues
next_column() and display painting previously assumed that any Unicode character (> 0xA0) occupied exactly 1 terminal column. This caused on-screen cursor positioning, horizontal scrolling, and vertical movement (getgoal) to drift out of sync when editing lines containing double-width characters (e.g., CJK ideographs, fullwidth punctuation, emojis) or zero-width combining characters. Fix this by: Adding utf8_width() in util.h backed by POSIX wcwidth() with fallback to 1. Initializing LC_CTYPE locale via setlocale(LC_CTYPE, "") in main(). Accounting for character width in display.c's paint_raw() and paint_char(). Using utf8_to_unicode() and utf8_width() in msg_append(). Making setccol() in random.c decode multi-byte UTF-8 sequences and advance using next_column(). Signed-off-by: Jacky Mpoka
file_get_line() previously expanded the line buffer for long lines by manually allocating with malloc(), copying the data with strncpy(), and freeing the old buffer in 128-byte increments. This incurred quadratic overhead on long lines and unnecessary strncpy passes. Use realloc() with geometric doubling instead, and ensure space for the terminating null byte. Also reset file_line_size to 0 when freeing file_line in file_close(). In file_exists(), replace fopen()/fclose() with access(fname, F_OK). Using access() is more efficient and does not fail on files that exist without read permissions. Also clean up an obsolete comment referencing decryption. Signed-off-by: Jacky Mpoka
Repository: torvalds/uemacs. Description: Random version of microemacs with my private modificatons Stars: 2201, Forks: 326. Primary language: C. Languages: C (99.1%), Makefile (0.7%), Batchfile (0.2%). Open PRs: 17, open issues: 3. Last activity: 3mo ago. Community health: 42%. Top contributors: torvalds, tfarina, penberg, dardevelin, ulm, vonbrand, lijie, naota, thiagofarina.