Giter Site home page Giter Site logo

Comments (12)

LevitatingBusinessMan avatar LevitatingBusinessMan commented on August 23, 2024 2

The fix might just need to be to revert #598. Because a single application is being buggy doesn't mean you should disable an entire feature for a platform. I have no idea how that even got merged, the original PR it originates from re-set the bracketed paste but now it just disables it. Seemingly no-one cared to actually review that PR before merging.

from reedline.

fdncred avatar fdncred commented on August 23, 2024 2

@LevitatingBusinessMan In case you're not aware, your comments here and in #598 are rude and disrespectful. Reedline and Nushell is written and maintained by a handful of volunteers. We're all human and have different technical backgrounds, we make mistakes sometimes, and we have feelings. We're always up for constructive criticism but you're not being constructive. Please be mindful of this going forward. Thank you.

from reedline.

LevitatingBusinessMan avatar LevitatingBusinessMan commented on August 23, 2024 1

@fdncred This project has thousands of daily downloads on crates.io. I'd argue a project of this size comes with certain responsibilities. I understand how bugs can be merged, it happens to every project. But in this case a feature was blatantly disabled on a platform and it was stated as a bugfix in the changelog.

This could've easily been prevented if the reviewer had actually reviewed the change (let alone tested it). Or if the merge had happened on the nushell side as was proposed originally.

from reedline.

fdncred avatar fdncred commented on August 23, 2024 1

What I was objecting to was your tone of dismissiveness and greater-than-thou attitude that was coming across. Again, maybe you didn't mean to act that way, but that's how it was coming across. I like to give people the benefit of the doubt because it's so hard to read emotion and intent in text sometimes. We all try hard, and everyone does their best. We have an excellent core-team. We don't appreciate people being rude and disrespectful to us and trying to bully us into making a change or undo a change.

Please feel free to submit a PR that you believe fixes the problem, otherwise let's please move on.

from reedline.

fdncred avatar fdncred commented on August 23, 2024

I can reproduce this on Ubuntu in WSL. I wonder if it's a bug in crossterm or if we've just implemented it wrong?

from reedline.

sigoden avatar sigoden commented on August 23, 2024

This bug may be related to

https://github.com/nushell/reedline/blob/adc20cb3710c6177203cb373604c10c6f089c41b/src/engine.rs#L633C1-L634C41

#598

from reedline.

fdncred avatar fdncred commented on August 23, 2024

Ya, that first link could be the issue. I'm not sure why we'd disable it on every read_line? Seems like we should check to see if it is meant to be enabled or not before automatically always disabling it?

Just playing around with the demo, I noticed that if I enable it on every loop, it works fine.

    loop {
        let res = line_editor.enable_bracketed_paste();
        let bracketed_paste_enabled = res.is_ok();
        if !bracketed_paste_enabled {
            println!("Warn: failed to enable bracketed paste mode: {res:?}");
        }

        let sig = line_editor.read_line(&prompt);

Lemme try to take that engine part out while I'm playing around and see if that fixes it.

from reedline.

fdncred avatar fdncred commented on August 23, 2024

ya, commenting out these lines makes it work too.

    pub fn read_line(&mut self, prompt: &dyn Prompt) -> Result<Signal> {
        terminal::enable_raw_mode()?;

        let result = self.read_line_helper(prompt);

        // #[cfg(not(target_os = "windows"))]
        // self.disable_bracketed_paste()?;

        if self.use_kitty_protocol {
            let _ = execute!(io::stdout(), event::PopKeyboardEnhancementFlags);
        }

        terminal::disable_raw_mode()?;
        result
    }

I wonder if we should have something like how the kitty protocol is checked? e.g. if self.use_bracketed_paste { ... }

from reedline.

amtoine avatar amtoine commented on August 23, 2024

@sigoden
is this related to nushell/nushell#9944 as well? 😋

from reedline.

LevitatingBusinessMan avatar LevitatingBusinessMan commented on August 23, 2024

Huh, so this is why I kept thinking that bracketed paste wasn't working yet when others said it did. The feature was literally disabled on Linux...

from reedline.

fdncred avatar fdncred commented on August 23, 2024

@LevitatingBusinessMan Feel free to create a PR that works better. It apparently works the first time you paste but not after that.

from reedline.

LevitatingBusinessMan avatar LevitatingBusinessMan commented on August 23, 2024

Fixed in #657

from reedline.

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.