Comments (12)
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.
@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.
@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.
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.
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.
This bug may be related to
from reedline.
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.
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.
@sigoden
is this related to nushell/nushell#9944 as well? 😋
from reedline.
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.
@LevitatingBusinessMan Feel free to create a PR that works better. It apparently works the first time you paste but not after that.
from reedline.
Fixed in #657
from reedline.
Related Issues (20)
- Prefix history search broken in vi-mode HOT 5
- `columnar_menu` panics on non-ASCII characters in directory
- Mouse controls HOT 1
- vi keybinds are wrong and/or inconsistent with readline HOT 2
- Modal Menus
- Default keybind for "newline" HOT 1
- Column menu spaces don't respect special characters (accents, emojis...)
- Cursor slowdown when pressing left/right arrows and there is a lot of text in the prompt HOT 2
- analog to inputrc for programs using reedline HOT 1
- progress in recommended phrase by one word-bound HOT 1
- Problem with powershell HOT 2
- `oh-my-posh` left and right prompt are not drawn at the same level HOT 3
- Panic in IdeMenu::create_value_string HOT 1
- Command history additional alternative to sync_on_enter HOT 3
- Nushell: Multi-line Prompt Bug When Resizing Window HOT 2
- Highlight arbitrary matches HOT 3
- readline with initialize input HOT 3
- clear_screen to fit in Warp's manner HOT 12
- how to write config.nu to make a new keybinding to go from vi_normal to vi_insert HOT 3
- Different color struct HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reedline.