1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

rename normalize_to_nfc to normalize_output_to_unicode_nfc

Makes it a bit more verbose, but also a bit clearer what it does.

refs: #2482
This commit is contained in:
Wez Furlong 2022-09-24 19:41:37 -07:00
parent cff0e5f2a3
commit 47a15153b9
6 changed files with 9 additions and 8 deletions

View File

@ -324,7 +324,7 @@ pub struct Config {
pub debug_key_events: bool,
#[dynamic(default)]
pub normalize_to_nfc: bool,
pub normalize_output_to_unicode_nfc: bool,
#[dynamic(default)]
pub disable_default_key_bindings: bool,

View File

@ -97,8 +97,8 @@ impl wezterm_term::TerminalConfiguration for TermConfig {
self.configuration().debug_key_events
}
fn normalize_to_nfc(&self) -> bool {
self.configuration().normalize_to_nfc
fn normalize_output_to_unicode_nfc(&self) -> bool {
self.configuration().normalize_output_to_unicode_nfc
}
fn bidi_mode(&self) -> BidiMode {

View File

@ -19,9 +19,9 @@ As features stabilize some brief notes about them will accumulate here.
* [wezterm.gui.default_key_tables](config/lua/wezterm.gui/default_key_tables.md)
and [wezterm.gui.default_keys](config/lua/wezterm.gui/default_keys.md) for
more conveniently copying and extending the default configuration.
* [normalize_to_nfc](config/lua/config/normalize_to_nfc.md) option to normalize
terminal output to Unicode NFC prior to applying it to the terminal model.
[#2482](https://github.com/wez/wezterm/issues/2482)
* [normalize_output_to_unicode_nfc](config/lua/config/normalize_output_to_unicode_nfc.md)
option to normalize terminal output to Unicode NFC prior to applying it to
the terminal model. [#2482](https://github.com/wez/wezterm/issues/2482)
* [cursor_thickness](config/lua/config/cursor_thickness.md),
[underline_thickness](config/lua/config/underline_thickness.md),
[underline_position](config/lua/config/underline_position.md) and

View File

@ -195,7 +195,7 @@ pub trait TerminalConfiguration: std::fmt::Debug {
/// Whether to normalize incoming text runs to
/// canonical NFC unicode representation
fn normalize_to_nfc(&self) -> bool {
fn normalize_output_to_unicode_nfc(&self) -> bool {
false
}

View File

@ -119,7 +119,8 @@ impl<'a> Performer<'a> {
let seqno = self.seqno;
let mut p = std::mem::take(&mut self.print);
let normalized: String;
let text = if self.config.normalize_to_nfc() && is_nfc_quick(p.chars()) != IsNormalized::Yes
let text = if self.config.normalize_output_to_unicode_nfc()
&& is_nfc_quick(p.chars()) != IsNormalized::Yes
{
normalized = p.as_str().nfc().collect();
normalized.as_str()