Coder Social home page Coder Social logo

Comments (15)

musjj avatar musjj commented on June 4, 2024 1

Tried to make it more reproducible:

base64 /dev/urandom | head -c 100000000
kitty @ get-text --ansi --extent=all | nvim -u NONE

Try increading the head number if the issue doesn't occur. At this point, this might not be a plugin issue but I'm still curious if someone else can reproduce it.

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024 1

Tried to make it more reproducible:

base64 /dev/urandom | head -c 100000000
kitty @ get-text --ansi --extent=all | nvim -u NONE

Try increading the head number if the issue doesn't occur. At this point, this might not be a plugin issue but I'm still curious if someone else can reproduce it.

Awesome, thanks for this. I was able to reproduce on an Ubuntu VM. I couldn't reproduce on MacOS. I think you are right about Kitty or Nvim having issues with the large stdout/stdin. I'll try and dig more into this later to get a better understanding and may open an upstream ticket.

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024 1

This one works for me, it captures the entire scrollback! Can this workaround be used for the plugin?

Great. I'll have to make some changes but should be able to do it 👍

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024 1

Tested it out and it works perfectly, thanks a lot for the fix!

🥳 awesome. Thanks for reporting and helping reproduce 👍. I'll have it merged to main probably sometime tomorrow.

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024 1

🎉 This issue has been resolved in version 1.0.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024

Thanks for the feedback.

  • Are you on Linux or Mac?
  • Could you provide a screenshot?

from kitty-scrollback.nvim.

musjj avatar musjj commented on June 4, 2024

I'm on Linux.

Before triggering the pager:

image

After triggering the pager:

image

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024

@musjj thanks for the screenshots.

  • What shell are you using? (bash, zsh, fish, etc)

  • Are there any errors during checkhealth?

nvim +'KittyScrollbackCheckHealth' +'quit!'
  • Could you run these two commands and let me know if it produces that same result?
kitty @ get-text --ansi --extent=all | nvim
kitty @ get-text --ansi --extent=all | sed -e "s/$/\x1b[0m/g" -e "s/\x1b\[\?25.\x1b\[.*;.*H\x1b\[.*//g" | nvim

I'm trying to determine if this is coming from Kitty or if it is any of the processing in the plugin.

from kitty-scrollback.nvim.

musjj avatar musjj commented on June 4, 2024

I'm using zsh 5.9
I'm getting one healthcheck error, but I'm not sure if it's relevant:

kitty-scrollback: sed ~
- ERROR Failed to run healthcheck for "kitty-scrollback" plugin. Exception:
  ...unwrapped-9ec0ecb/share/nvim/runtime/lua/vim/_system.lua:241: ENOENT: no such file or directory

Running !sed --version inside nvim works just fine though.

kitty @ get-text --ansi --extent=all | nvim

I'm getting mixed results with this, but I'm not really sure why. Most of the time nvim don't end up displaying any contents. I also tried piping to nvim -u NONE with similar results. Piping to vim (9.0.1811) also yields similar results, but interestingly if I wait for a bit I can see the contents of the pipe flowing into the buffer gradually.

It feels like there's some kind of race condition when it comes to piping large text content, either from the kitty side or nvim side (or both?).

kitty @ get-text --ansi --extent=all | sed -e "s/$/\x1b[0m/g" -e "s/\x1b\[\?25.\x1b\[.*;.*H\x1b\[.*//g" | nvim

I'm seeing similar inconsistencies here, but in this case I usually get a tiny bit of content (some kind of terminal escape). But if I repeat the command enough I can sometimes get the complete scrollback of the terminal.

Sorry if there's a lot of vague-ness here, it's a weird issue. Can you reproduce this in your end? That might make debugging it easier.

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024

@musjj Thanks for the info. I'm not able to reproduce the issue. I'll experiment around but any info you have will be helpful 👍

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024

@musjj could you try

base64 /dev/urandom | head -c 100000000
nvim -u NONE <<< $(kitty @ get-text --ansi --extent=all)

This seems to work for me. This waits for the entire stdout before passing to NVIM.

from kitty-scrollback.nvim.

musjj avatar musjj commented on June 4, 2024

This one works for me, it captures the entire scrollback! Can this workaround be used for the plugin?

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024

Hey @musjj just an update. This may actually be a bug in Neovim. I'm going to dig in a little deeper and probably open an upstream ticket.

Edit: not a Neovim bug, just came across undocumented values for scrollback neovim/neovim#25245

from kitty-scrollback.nvim.

mikesmithgh avatar mikesmithgh commented on June 4, 2024

@musjj so this is a tricky one 😂 . Ok I think I got it working now, would you mind doing a test with the branch fix-long-text-truncate ?

I added a statement to explicitly flush the buffer to stdout.

Not necessary, but you may also want to checkout the kitty option scrollback_pager_history_size if you want to increase the overall size of the scrollback.

from kitty-scrollback.nvim.

musjj avatar musjj commented on June 4, 2024

Tested it out and it works perfectly, thanks a lot for the fix!

from kitty-scrollback.nvim.

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.