Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode search by name crash for 🔥 emoji #1035

Closed
AlexandreRio opened this issue Sep 28, 2018 · 0 comments
Closed

Unicode search by name crash for 🔥 emoji #1035

AlexandreRio opened this issue Sep 28, 2018 · 0 comments

Comments

@AlexandreRio
Copy link

When searching for unicode by name (Ctrl+Shift+u) and searching for "fire" produce the following stacktrace when typing the r.
It works fine for every other search terms (as far as I know).

Exception in callback Loop._read_ready(<kittens.unic...x7fd9ddf7e3c8>, 6)
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/bin/../lib/kitty/kittens/tui/loop.py", line 188, in _read_ready
    self.read_buf = self.parse_input_from_terminal(self.read_buf, self.in_bracketed_paste)
  File "/usr/bin/../lib/kitty/kittens/tui/loop.py", line 211, in _on_text
    self.handler.on_text(chunk, self.in_bracketed_paste)
  File "/usr/bin/../lib/kitty/kittens/unicode_input/main.py", line 389, in on_text
    self.refresh()
  File "/usr/bin/../lib/kitty/kittens/unicode_input/main.py", line 385, in refresh
    self.draw_screen()
  File "/usr/bin/../lib/kitty/kittens/unicode_input/main.py", line 381, in draw_screen
    self.write(self.table.layout(self.screen_size.rows - self.table_at, self.screen_size.cols))
  File "/usr/bin/../lib/kitty/kittens/tui/handler.py", line 89, in write
    data = data.encode('utf-8')
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in position 867: surrogates not allowed

Press the Enter key to quit

Kitty version: kitty 0.12.1 created by Kovid Goyal
OS version: up to date Archlinux

I think I'm using the default conf or with minor changes:

font_family      DroidSansMono
italic_font      auto
bold_font        auto
bold_italic_font auto
font_size        11.0
font_size_delta 2
adjust_line_height 0
adjust_column_width 0
box_drawing_scale 0.001, 1, 1.5, 2
cursor           #cccccc
cursor_shape     block
cursor_blink_interval     0.5
cursor_stop_blinking_after 15.0
scrollback_lines 2000
scrollback_pager less +G -R
wheel_scroll_multiplier 5.0
url_color #0087BD
url_style curly
open_url_modifiers ctrl+shift
open_url_with default
copy_on_select no
rectangle_select_modifiers ctrl+alt
select_by_word_characters :@-./_~?&=%+#
click_interval 0.5
mouse_hide_wait 3.0
focus_follows_mouse no
repaint_delay    10
input_delay 3
sync_to_monitor yes
visual_bell_duration 0.0
enable_audio_bell no
remember_window_size   yes
initial_window_width   640
initial_window_height  400
enabled_layouts *
window_border_width 1
window_margin_width 0
window_padding_width 0
active_border_color #00ff00
inactive_border_color #cccccc
inactive_text_alpha 1.0
tab_bar_edge bottom
tab_separator " ┇"
active_tab_foreground #002a34
active_tab_background #eee
active_tab_font_style bold-italic
inactive_tab_foreground #444
inactive_tab_background #999
inactive_tab_font_style normal
foreground       #dddddd
background       #002a34
background_opacity 1.0
selection_foreground #7e9092
selection_background #FFFACD
color0   #073642
color8   #002b36
color1   #cc0403
color9   #f2201f
color2   #19cb00
color10  #23fd00
color3   #cecb00
color11  #fffd00
color4  #0d73cc
color12 #1a8fff
color5   #cb1ed1
color13  #fd28ff
color6   #0dcdcd
color14  #14ffff
color7   #dddddd
color15  #ffffff
shell .
close_on_child_death no
allow_remote_control no
term xterm-kitty
map ctrl+shift+v        paste_from_clipboard
map ctrl+shift+s        paste_from_selection
map ctrl+shift+c        copy_to_clipboard
map shift+insert        paste_from_selection
map ctrl+shift+o        pass_selection_to_program
map ctrl+shift+up        scroll_line_up
map ctrl+shift+down      scroll_line_down
map ctrl+shift+k         scroll_line_up
map ctrl+shift+j         scroll_line_down
map ctrl+shift+page_up   scroll_page_up
map ctrl+shift+page_down scroll_page_down
map ctrl+shift+home      scroll_home
map ctrl+shift+end       scroll_end
map ctrl+shift+h         show_scrollback
map ctrl+shift+enter    new_window
map ctrl+shift+n        new_os_window
map ctrl+shift+w        close_window
map ctrl+shift+]        next_window
map ctrl+shift+[        previous_window
map ctrl+shift+f        move_window_forward
map ctrl+shift+b        move_window_backward
map ctrl+shift+`        move_window_to_top
map ctrl+shift+1        first_window
map ctrl+shift+2        second_window
map ctrl+shift+3        third_window
map ctrl+shift+4        fourth_window
map ctrl+shift+5        fifth_window
map ctrl+shift+6        sixth_window
map ctrl+shift+7        seventh_window
map ctrl+shift+8        eighth_window
map ctrl+shift+9        ninth_window
map ctrl+shift+0        tenth_window
map ctrl+shift+right    next_tab
map ctrl+shift+left     previous_tab
map ctrl+shift+t        new_tab
map ctrl+shift+q        close_tab
map ctrl+shift+l        next_layout
map ctrl+shift+.        move_tab_forward
map ctrl+shift+,        move_tab_backward
map ctrl+shift+alt+t    set_tab_title
map ctrl+shift+equal    increase_font_size
map ctrl+shift+minus    decrease_font_size
map ctrl+shift+backspace restore_font_size
map ctrl+shift+f11      toggle_fullscreen
map ctrl+shift+u        input_unicode_character
map ctrl+shift+f2       edit_config_file
map ctrl+shift+e        run_simple_kitten text url_hints
macos_titlebar_color system
macos_hide_titlebar no
macos_option_as_alt yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant