Giter Club home page Giter Club logo

Comments (15)

kovidgoyal avatar kovidgoyal commented on May 13, 2024

I cannot replicate that. I tried the above command 20 times at different font and windows sizes.

from kitty.

mmlb avatar mmlb commented on May 13, 2024

hmm, with zsh?

from kitty.

mmlb avatar mmlb commented on May 13, 2024

I did compare this with alacritty and pangoterm, both were fine. It does look like something to do with zsh though since I can't reproduce with bash on kitty.

from kitty.

mmlb avatar mmlb commented on May 13, 2024

Yup it does seem to be something with zsh, let me try to whittle it down.

from kitty.

kovidgoyal avatar kovidgoyal commented on May 13, 2024

Yes, with zsh -- zsh is my primary shell.

from kitty.

mmlb avatar mmlb commented on May 13, 2024

ok looks to be something to do with my prompt: https://github.com/molovo/filthy

from kitty.

kovidgoyal avatar kovidgoyal commented on May 13, 2024

You should be ablet ocreate a dump of commands kitty sees using --dump-commands

Then replay it with

--replay-commands

and if that reproduces it, attach the dump here.

Note that the dump/replay functionality is not fully implemented, so it may not work.

from kitty.

mmlb avatar mmlb commented on May 13, 2024

hmm kitty is throwing an exception while trying to replay the commands, I ran it like kitty --replay-commands kitty-commands. I'm attaching the dumped commands

kitty-commands.zip

contents of zip file in case you don't want to open it:

❯ cat kitty-commands
draw
screen_carriage_return
screen_carriage_return
screen_carriage_return
screen_linefeed
select_graphic_rendition 34
draw ~
select_graphic_rendition 39
draw
select_graphic_rendition 33
select_graphic_rendition 39
draw
screen_carriage_return
screen_linefeed
screen_carriage_return
select_graphic_rendition 0
select_graphic_rendition 27
select_graphic_rendition 24
screen_erase_in_display 0 0
select_graphic_rendition 32
draw ❯
select_graphic_rendition 39
draw
screen_erase_in_line 0 0
screen_cursor_forward 242
select_graphic_rendition 33
select_graphic_rendition 39
screen_cursor_back1 242
screen_set_mode 2004 1
select_graphic_rendition 1
select_graphic_rendition 31
draw e
select_graphic_rendition 0
select_graphic_rendition 39
select_graphic_rendition 90
draw xit
select_graphic_rendition 39
screen_backspace
screen_backspace
screen_backspace
screen_backspace
select_graphic_rendition 1
select_graphic_rendition 31
draw e
select_graphic_rendition 1
select_graphic_rendition 31
draw c
select_graphic_rendition 0
select_graphic_rendition 39
select_graphic_rendition 90
draw h
select_graphic_rendition 90
draw o
select_graphic_rendition 90
draw  "begin test"
select_graphic_rendition 39
screen_cursor_back1 15
screen_backspace
screen_backspace
select_graphic_rendition 1
select_graphic_rendition 31
draw e
select_graphic_rendition 1
select_graphic_rendition 31
draw c
select_graphic_rendition 1
select_graphic_rendition 31
draw h
select_graphic_rendition 0
select_graphic_rendition 39
screen_backspace
screen_backspace
screen_backspace
select_graphic_rendition 0
select_graphic_rendition 32
draw e
select_graphic_rendition 0
select_graphic_rendition 32
draw c
select_graphic_rendition 0
select_graphic_rendition 32
draw h
select_graphic_rendition 32
draw o
select_graphic_rendition 39
select_graphic_rendition 39
draw
select_graphic_rendition 33
draw "
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw "
select_graphic_rendition 33
draw t
select_graphic_rendition 39
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
screen_cursor_back1 10
screen_backspace
select_graphic_rendition 33
draw t
select_graphic_rendition 33
draw e
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw e
select_graphic_rendition 33
draw s
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw s
select_graphic_rendition 33
draw t
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw t
select_graphic_rendition 33
draw i
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw i
select_graphic_rendition 33
draw n
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw n
select_graphic_rendition 33
draw g
select_graphic_rendition 39
screen_backspace
select_graphic_rendition 33
draw g
select_graphic_rendition 33
draw "
select_graphic_rendition 39
screen_reset_mode 2004 1
screen_carriage_return
screen_carriage_return
screen_linefeed
set_title manny: echo "testing"
set_icon manny: echo "testing"
draw testing
screen_carriage_return
screen_linefeed
draw
screen_carriage_return
screen_carriage_return
screen_carriage_return
screen_linefeed
select_graphic_rendition 34
draw ~
select_graphic_rendition 39
draw
select_graphic_rendition 33
select_graphic_rendition 39
draw
screen_carriage_return
screen_linefeed
screen_carriage_return
select_graphic_rendition 0
select_graphic_rendition 27
select_graphic_rendition 24
screen_erase_in_display 0 0
select_graphic_rendition 32
draw ❯
select_graphic_rendition 39
draw
screen_erase_in_line 0 0
screen_cursor_forward 242
select_graphic_rendition 33
select_graphic_rendition 39
screen_cursor_back1 242
screen_set_mode 2004 1
select_graphic_rendition 7
draw
select_graphic_rendition 7
select_graphic_rendition 32
draw printf
select_graphic_rendition 39
select_graphic_rendition 7
draw
select_graphic_rendition 7
select_graphic_rendition 33
draw "
select_graphic_rendition 7
select_graphic_rendition 36
draw $IFS
select_graphic_rendition 39
select_graphic_rendition 7
select_graphic_rendition 33
draw \r"
select_graphic_rendition 39
select_graphic_rendition 7
draw  |
select_graphic_rendition 7
select_graphic_rendition 32
draw hexdump
select_graphic_rendition 39
select_graphic_rendition 7
draw  -C
select_graphic_rendition 27
screen_cursor_back1 29
select_graphic_rendition 27
draw
select_graphic_rendition 27
select_graphic_rendition 32
draw p
select_graphic_rendition 27
select_graphic_rendition 32
draw r
select_graphic_rendition 27
select_graphic_rendition 32
draw i
select_graphic_rendition 27
select_graphic_rendition 32
draw n
select_graphic_rendition 27
select_graphic_rendition 32
draw t
select_graphic_rendition 27
select_graphic_rendition 32
draw f
select_graphic_rendition 39
select_graphic_rendition 27
draw
select_graphic_rendition 27
select_graphic_rendition 33
draw "
select_graphic_rendition 27
select_graphic_rendition 36
draw $
select_graphic_rendition 27
select_graphic_rendition 36
draw I
select_graphic_rendition 27
select_graphic_rendition 36
draw F
select_graphic_rendition 27
select_graphic_rendition 36
draw S
select_graphic_rendition 39
select_graphic_rendition 27
select_graphic_rendition 33
draw \
select_graphic_rendition 27
select_graphic_rendition 33
draw r
select_graphic_rendition 27
select_graphic_rendition 33
draw "
select_graphic_rendition 39
select_graphic_rendition 27
draw
select_graphic_rendition 27
draw |
select_graphic_rendition 27
draw
select_graphic_rendition 27
select_graphic_rendition 32
draw h
select_graphic_rendition 27
select_graphic_rendition 32
draw e
select_graphic_rendition 27
select_graphic_rendition 32
draw x
select_graphic_rendition 27
select_graphic_rendition 32
draw d
select_graphic_rendition 27
select_graphic_rendition 32
draw u
select_graphic_rendition 27
select_graphic_rendition 32
draw m
select_graphic_rendition 27
select_graphic_rendition 32
draw p
select_graphic_rendition 39
select_graphic_rendition 27
draw
select_graphic_rendition 27
draw -
select_graphic_rendition 27
draw C
screen_reset_mode 2004 1
screen_carriage_return
screen_carriage_return
screen_linefeed
set_title manny: printf "$IFS
set_icon manny: printf "$IFS
draw r" | hexdump -C
screen_bell
draw 00000000  20 09 0a 00 0d                                    | ....|
screen_carriage_return
screen_linefeed
draw 00000005
screen_carriage_return
screen_linefeed
draw
screen_carriage_return
screen_carriage_return
screen_carriage_return
screen_linefeed
select_graphic_rendition 34
draw ~
select_graphic_rendition 39
draw
select_graphic_rendition 33
select_graphic_rendition 39
draw
screen_carriage_return
screen_linefeed
screen_carriage_return
select_graphic_rendition 0
select_graphic_rendition 27
select_graphic_rendition 24
screen_erase_in_display 0 0
select_graphic_rendition 32
draw ❯
select_graphic_rendition 39
draw
screen_erase_in_line 0 0
screen_cursor_forward 242
select_graphic_rendition 33
select_graphic_rendition 39
screen_cursor_back1 242
screen_set_mode 2004 1
select_graphic_rendition 1
select_graphic_rendition 31
draw e
select_graphic_rendition 0
select_graphic_rendition 39
select_graphic_rendition 90
draw cho "testing"
select_graphic_rendition 39
screen_cursor_back1 13
screen_backspace
select_graphic_rendition 0
select_graphic_rendition 32
draw e
select_graphic_rendition 32
draw x
select_graphic_rendition 39
select_graphic_rendition 90
draw i
select_graphic_rendition 90
draw t
select_graphic_rendition 39
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
select_graphic_rendition 39
draw
screen_cursor_back1 12
screen_backspace
screen_backspace
select_graphic_rendition 1
select_graphic_rendition 31
draw e
select_graphic_rendition 1
select_graphic_rendition 31
draw x
select_graphic_rendition 1
select_graphic_rendition 31
draw i
select_graphic_rendition 0
select_graphic_rendition 39
screen_backspace
screen_backspace
screen_backspace
select_graphic_rendition 0
select_graphic_rendition 32
draw e
select_graphic_rendition 0
select_graphic_rendition 32
draw x
select_graphic_rendition 0
select_graphic_rendition 32
draw i
select_graphic_rendition 32
draw t
select_graphic_rendition 39
screen_reset_mode 2004 1
screen_carriage_return
screen_carriage_return
screen_linefeed
set_title manny: exit
set_icon manny: exit

from kitty.

mmlb avatar mmlb commented on May 13, 2024

also, here's the stacktrace for the exception:

kitty --replay-commands kitty-commands                                                                                                                                                                                                             
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/bin/../lib/kitty/__main__.py", line 7, in <module>
    main()
  File "/usr/bin/../lib/kitty/kitty/main.py", line 230, in main
    main(args.replay_commands)
  File "/usr/bin/../lib/kitty/kitty/client.py", line 89, in main
    replay(raw)
  File "/usr/bin/../lib/kitty/kitty/client.py", line 84, in replay
    globals()[cmd](*rest)
KeyError: 'screen_linefeed' 

from kitty.

kovidgoyal avatar kovidgoyal commented on May 13, 2024

I have committed the missing functionality to replay, please regenerate the dump (and do it by redirecting the output to a file as if you copy/paste from the terminal trailing spaces will be removed, which are needed). Also try to do only the minimal amount of typing to generate the problem when creating the dump.

from kitty.

kovidgoyal avatar kovidgoyal commented on May 13, 2024

Actually, I just added --dump-bytes which will dump the actual raw bytes received from the child process. Use that instead of --dump-commands. (You will have to recompile kitty for it to work).

from kitty.

mmlb avatar mmlb commented on May 13, 2024

Here is the --dump-bytes file, all I did was paste the printf command and type exit.
kitty-dump.zip

from kitty.

kovidgoyal avatar kovidgoyal commented on May 13, 2024

If I cat the attached file, I see no problems in either kitty or any other terminal. Opening the dump file in a hex editor shows it is missing the \r character from your initial post

from kitty.

mmlb avatar mmlb commented on May 13, 2024

🎉 thanks @kovidgoyal

from kitty.

kovidgoyal avatar kovidgoyal commented on May 13, 2024

you're welcome :)

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.