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 ,
@@ -462,6 +462,16 @@ func defaultFakeCursor() bool {
462462 return false
463463}
464464
465+ func defaultPaste () bool {
466+ _ , wt := os .LookupEnv ("WT_SESSION" )
467+ if runtime .GOOS == "windows" && wt {
468+ // enabled for windows terminal app where the default paste bindings
469+ // like Ctrl-v and Ctrl-Shift-v produce bracketed paste
470+ return true
471+ }
472+ return false
473+ }
474+
465475func GetInfoBarOffset () int {
466476 offset := 0
467477 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