File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ var DefaultGlobalOnlySettings = map[string]any{
123123 "mouse" : true ,
124124 "multiopen" : "tab" ,
125125 "parsecursor" : false ,
126- "paste" : false ,
126+ "paste" : defaultPaste () ,
127127 "pluginchannels" : []string {"https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json" },
128128 "pluginrepos" : []string {},
129129 "savehistory" : true ,
@@ -463,6 +463,16 @@ func defaultFakeCursor() bool {
463463 return false
464464}
465465
466+ func defaultPaste () bool {
467+ _ , wt := os .LookupEnv ("WT_SESSION" )
468+ if runtime .GOOS == "windows" && wt {
469+ // enabled for windows terminal app where the default paste bindings
470+ // like Ctrl-v and Ctrl-Shift-v produce bracketed paste
471+ return true
472+ }
473+ return false
474+ }
475+
466476func GetInfoBarOffset () int {
467477 offset := 0
468478 if GetGlobalOption ("infobar" ).(bool ) {
Original file line number Diff line number Diff line change @@ -306,6 +306,8 @@ Here are the available options:
306306 keybinding) then it is a good idea to enable this option during the paste
307307 and disable once the paste is over. See ` > help copypaste ` for details about
308308 copying and pasting in a terminal environment.
309+ Note: This option defaults to ` true ` in case ` micro ` is used in the Windows
310+ Terminal App.
309311
310312 default value: ` false `
311313
You can’t perform that action at this time.
0 commit comments