mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-21 22:01:31 +03:00
Fix code page 437 string
It had an extra "▀", and skipped the null at the start (which I'm replacing with a space so it doesn't mess up the screen when inserting.)
This commit is contained in:
parent
1f171259bb
commit
da3136a2d2
10
windows.py
10
windows.py
@ -254,14 +254,12 @@ class CharacterSelectorDialogWindow(DialogWindow):
|
||||
# """Initialize the message."""
|
||||
# self.character = character
|
||||
|
||||
# TODO: fact check this string
|
||||
# NUL at the beginning and NBSP at the end are replaced with spaces
|
||||
# spell-checker: disable
|
||||
code_page_437 = "☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▀▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
|
||||
code_page_437 = " ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
|
||||
# spell-checker: enable
|
||||
char_list = [char for char in code_page_437]
|
||||
|
||||
# char_list = ["A", "b", "c"] * 4
|
||||
|
||||
def __init__(self, *children: Widget, selected_character: str|None, handle_selected_character: Callable[[str], None], **kwargs: Any) -> None:
|
||||
"""Initialize the dialog window."""
|
||||
super().__init__(handle_button=self.handle_button, *children, **kwargs)
|
||||
@ -282,8 +280,8 @@ class CharacterSelectorDialogWindow(DialogWindow):
|
||||
|
||||
def on_data_table_cell_highlighted(self, event: DataTable.CellHighlighted) -> None:
|
||||
"""Called when a cell is highlighted."""
|
||||
assert isinstance(event.value, str)
|
||||
self._selected_character = event.value
|
||||
# assert isinstance(event.value, str), "DataTable should only contain strings, but got: " + repr(event.value)
|
||||
self._selected_character = event.value if isinstance(event.value, str) else " "
|
||||
|
||||
def on_mount(self) -> None:
|
||||
"""Called when the window is mounted."""
|
||||
|
Loading…
Reference in New Issue
Block a user