@@ -3,8 +3,7 @@ use std::process::Command;
3
3
use {
4
4
crossterm:: {
5
5
cursor:: SetCursorStyle ,
6
- event:: { DisableBracketedPaste , KeyCode , KeyModifiers } ,
7
- execute,
6
+ event:: { KeyCode , KeyModifiers } ,
8
7
} ,
9
8
nu_ansi_term:: { Color , Style } ,
10
9
reedline:: {
13
12
EditCommand , EditMode , Emacs , ExampleHighlighter , Keybindings , ListMenu , Reedline ,
14
13
ReedlineEvent , ReedlineMenu , Signal , Vi ,
15
14
} ,
16
- std:: io:: stdout,
17
15
} ;
18
16
19
17
use reedline:: CursorConfig ;
@@ -89,17 +87,14 @@ fn main() -> std::io::Result<()> {
89
87
. with_quick_completions ( true )
90
88
. with_partial_completions ( true )
91
89
. with_cursor_config ( cursor_config)
90
+ . use_bracketed_paste ( true )
91
+ . use_kitty_keyboard_enhancement ( true )
92
92
. with_highlighter ( Box :: new ( ExampleHighlighter :: new ( commands) ) )
93
93
. with_hinter ( Box :: new (
94
94
DefaultHinter :: default ( ) . with_style ( Style :: new ( ) . fg ( Color :: DarkGray ) ) ,
95
95
) )
96
96
. with_validator ( Box :: new ( DefaultValidator ) )
97
97
. with_ansi_colors ( true ) ;
98
- let res = line_editor. enable_bracketed_paste ( ) ;
99
- let bracketed_paste_enabled = res. is_ok ( ) ;
100
- if !bracketed_paste_enabled {
101
- println ! ( "Warn: failed to enable bracketed paste mode: {res:?}" ) ;
102
- }
103
98
104
99
// Adding default menus for the compiled reedline
105
100
line_editor = line_editor
@@ -226,9 +221,6 @@ fn main() -> std::io::Result<()> {
226
221
}
227
222
}
228
223
229
- if bracketed_paste_enabled {
230
- let _ = execute ! ( stdout( ) , DisableBracketedPaste ) ;
231
- }
232
224
println ! ( ) ;
233
225
Ok ( ( ) )
234
226
}
0 commit comments