File tree Expand file tree Collapse file tree 1 file changed +26
-22
lines changed Expand file tree Collapse file tree 1 file changed +26
-22
lines changed Original file line number Diff line number Diff line change @@ -711,29 +711,33 @@ winbar.detach = function (window)
711
711
--- | fS
712
712
713
713
vim .schedule (function ()
714
- vim .w [window ].__wbID = nil ;
715
-
716
- --- Cached winbar.
717
- --- @type string | nil
718
- local _wb = vim .w [window ].__winbar or vim .g .__winbar or " " ;
719
-
720
- if _wb == " " or _wb == nil then
721
- --- Reset winbar.
722
- vim .api .nvim_win_call (window , function ()
723
- vim .cmd (" set winbar&" );
724
- end );
725
- else
726
- vim .api .nvim_set_option_value (
727
- " winbar" ,
728
- _wb ,
729
- {
730
- scope = " local" ,
731
- win = window
732
- }
733
- );
734
- end
714
+ pcall (function ()
715
+ vim .w [window ].__wbID = nil ;
716
+
717
+ --- Cached winbar.
718
+ --- @type string | nil
719
+ local _wb = vim .w [window ].__winbar or vim .g .__winbar or " " ;
720
+
721
+ if _wb == " " or _wb == nil then
722
+ --- Reset winbar.
723
+ vim .api .nvim_win_call (window , function ()
724
+ pcall (function ()
725
+ vim .cmd (" set winbar&" );
726
+ end );
727
+ end );
728
+ else
729
+ pcall (vim .api .nvim_set_option_value ,
730
+ " winbar" ,
731
+ _wb ,
732
+ {
733
+ scope = " local" ,
734
+ win = window
735
+ }
736
+ );
737
+ end
735
738
736
- winbar .state .attached_windows [window ] = false ;
739
+ winbar .state .attached_windows [window ] = false ;
740
+ end )
737
741
end );
738
742
739
743
--- | fE
You can’t perform that action at this time.
0 commit comments