Skip to content

Commit 0d01c9f

Browse files
committed
fix: T-junctions in native box drawings (neovide#3211)
* Fix the rendering issues (thickness of right and up/down arms) * Update the box-drawing test file
1 parent 68fefed commit 0d01c9f

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/renderer/box_drawing/box_drawing_test.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@
4949
┃ ┃ ┃
5050
┗━┻━┛
5151

52-
### Mixed T-Junctions
53-
┌─┰━┑
54-
│ ┃ │
55-
┝━╋━┥
56-
│ ┃ │
57-
└─┸━┘
52+
### Mixed T-Junctions and Cross Junctions
53+
┌─┰─┐ ┍━┭─┒ ┍━┱─┒ ┎─┮━┑ ┎─┲━┑ ┏━┯━┓
54+
│ ┃ │ │ │ ┃ │ ┃ ┃ ┃ │ │ ┃ ┃ │ ┃ │ ┃
55+
┝━╋━┥ ┢━┿━┩ ┟─╂─┦ ┡━┿━┪ ┞─╂─┧ ┠─┼─┨
56+
│ ┃ │ ┃ │ │ ┃ ┃ │ │ │ ┃ │ ┃ ┃ ┃ │ ┃
57+
└─┸─┘ ┖─┶━┙ ┖─┺━┙ ┕━┵─┚ ┕━┹─┚ ┗━┷━┛
5858

5959
## Dashed Lines
6060

src/renderer/box_drawing/renderer.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,10 +1515,10 @@ static BOX_CHARS: LazyLock<BTreeMap<char, BoxDrawFn>> = LazyLock::new(|| {
15151515
// ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳
15161516
'┬' -> None, t1, t1, t1
15171517
'┭' -> None, t1, t1, t3
1518-
'┮' -> None, t1, t3, t1
1519-
'┯' -> None, t1, t3, t3
1520-
'┰' -> None, t3, t1, t1
1521-
'┱' -> None, t3, t1, t3
1518+
'┮' -> None, t3, t1, t1
1519+
'┯' -> None, t3, t1, t3
1520+
'┰' -> None, t1, t3, t1
1521+
'┱' -> None, t1, t3, t3
15221522
'┲' -> None, t3, t3, t1
15231523
'┳' -> None, t3, t3, t3
15241524

@@ -1535,10 +1535,10 @@ static BOX_CHARS: LazyLock<BTreeMap<char, BoxDrawFn>> = LazyLock::new(|| {
15351535
// ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻
15361536
'┴' -> t1, t1, None, t1
15371537
'┵' -> t1, t1, None, t3
1538-
'┶' -> t3, t1, None, t1
1539-
'┷' -> t3, t1, None, t3
1540-
'┸' -> t1, t3, None, t1
1541-
'┹' -> t1, t3, None, t3
1538+
'┶' -> t1, t3, None, t1
1539+
'┷' -> t1, t3, None, t3
1540+
'┸' -> t3, t1, None, t1
1541+
'┹' -> t3, t1, None, t3
15421542
'┺' -> t3, t3, None, t1
15431543
'┻' -> t3, t3, None, t3
15441544

0 commit comments

Comments
 (0)