add a new disable_bracketed_paste method (#592)

* add a new disable_bracketed_paste function

* fix one typo
This commit is contained in:
WindSoilder 2023-06-10 04:11:19 +08:00 committed by GitHub
parent cd793416b1
commit de2c627951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -234,6 +234,15 @@ impl Reedline {
res
}
/// Disable BracketedPaste feature.
pub fn disable_bracketed_paste(&mut self) -> Result<()> {
let res = execute!(io::stdout(), DisableBracketedPaste);
if res.is_ok() {
self.bracket_paste_enabled = false;
}
res
}
/// Return the previously generated history session id
pub fn get_history_session_id(&self) -> Option<HistorySessionId> {
self.history_session_id

View File

@ -440,7 +440,7 @@ pub enum ReedlineEvent {
/// Mouse
Mouse, // Fill in details later
/// trigger termimal resize
/// trigger terminal resize
Resize(u16, u16),
/// Run these commands in the editor