mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 01:42:56 +08:00
Drop wcwidth ASCII check
Updated widechar_width takes care of it. Technically, this does ~3 comparisons more per-character (because it checks variation selectors and such), but that shouldn't really matter.
This commit is contained in:
parent
2d37bc9bd1
commit
a7b1c2f76a
|
@ -269,10 +269,6 @@ int fish_get_emoji_width(wchar_t c) {
|
|||
#include "widecharwidth/widechar_width.h"
|
||||
|
||||
int fish_wcwidth(wchar_t wc) {
|
||||
// Normal ASCII characters.
|
||||
// These are the most common case, so it's worth checking them first.
|
||||
if (wc < 0x7f && wc >= 0x20) return 1;
|
||||
|
||||
// The system version of wcwidth should accurately reflect the ability to represent characters
|
||||
// in the console session, but knows nothing about the capabilities of other terminal emulators
|
||||
// or ttys. Use it from the start only if we are logged in to the physical console.
|
||||
|
|
Loading…
Reference in New Issue
Block a user