mirror of
https://github.com/1j01/textual-paint.git
synced 2024-12-30 18:23:03 +03:00
Replace NUL in loop instead of in the string literal
This commit is contained in:
parent
da3136a2d2
commit
22cba20c35
@ -254,11 +254,13 @@ class CharacterSelectorDialogWindow(DialogWindow):
|
||||
# """Initialize the message."""
|
||||
# self.character = character
|
||||
|
||||
# NUL at the beginning and NBSP at the end are replaced with spaces
|
||||
# NUL at the beginning (0), SP in the middle (32), and NBSP at the end (255)
|
||||
# are all treated as space. Null can cause the screen to malfunction
|
||||
# if it's inserted into the document.
|
||||
# spell-checker: disable
|
||||
code_page_437 = " ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
|
||||
code_page_437 = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
|
||||
# spell-checker: enable
|
||||
char_list = [char for char in code_page_437]
|
||||
char_list = [(" " if char is "\0" else char) for char in code_page_437]
|
||||
|
||||
def __init__(self, *children: Widget, selected_character: str|None, handle_selected_character: Callable[[str], None], **kwargs: Any) -> None:
|
||||
"""Initialize the dialog window."""
|
||||
|
Loading…
Reference in New Issue
Block a user