Skip to content

Commit

Permalink
Fix DEC Special Character Set (Line drawing)
Browse files Browse the repository at this point in the history
This patch resolves some mapping issues with the line drawing character
set where characters like linefeed were incorrectly mapped to their
proper character representation rather than the codepoint of their
identification glpyh.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
  • Loading branch information
kugland and chrisduerr authored Jun 1, 2022
1 parent 63ef6c9 commit e20541a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Vi cursor blinking not reset when navigating in search
- Scrolling and middle-clicking modifying the primary selection
- Bottom gap for certain builtin box drawing characters
- Incorrect buili-in glyphs for `U+2567` and `U+2568`
- Incorrect built-in glyphs for `U+2567` and `U+2568`
- Character mappings in the DEC special graphics character set (line drawing)

## 0.10.1

Expand Down
13 changes: 7 additions & 6 deletions alacritty_terminal/src/ansi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,16 +848,17 @@ impl StandardCharset {
match self {
StandardCharset::Ascii => c,
StandardCharset::SpecialCharacterAndLineDrawing => match c {
'_' => ' ',
'`' => '◆',
'a' => '▒',
'b' => '\t',
'c' => '\u{000c}',
'd' => '\r',
'e' => '\n',
'b' => '\u{2409}', // Symbol for horizontal tabulation
'c' => '\u{240c}', // Symbol for form feed
'd' => '\u{240d}', // Symbol for carriage return
'e' => '\u{240a}', // Symbol for line feed
'f' => '°',
'g' => '±',
'h' => '\u{2424}',
'i' => '\u{000b}',
'h' => '\u{2424}', // Symbol for newline
'i' => '\u{240b}', // Symbol for vertical tabulation
'j' => '┘',
'k' => '┐',
'l' => '┌',
Expand Down
2 changes: 1 addition & 1 deletion alacritty_terminal/tests/ref/saved_cursor/grid.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion alacritty_terminal/tests/ref/saved_cursor_alt/grid.json

Large diffs are not rendered by default.

0 comments on commit e20541a

Please sign in to comment.