File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ require("copilot.panel").accept()
119
119
require (" copilot.panel" ).jump_next ()
120
120
require (" copilot.panel" ).jump_prev ()
121
121
require (" copilot.panel" ).open ({position , ratio })
122
+ require (" copilot.panel" ).toggle ()
122
123
require (" copilot.panel" ).refresh ()
123
124
```
124
125
Original file line number Diff line number Diff line change @@ -534,6 +534,14 @@ function mod.jump_next()
534
534
panel :jump (1 )
535
535
end
536
536
537
+ function mod .toggle ()
538
+ if panel .winid and vim .api .nvim_win_is_valid (panel .winid ) then
539
+ panel :close ()
540
+ else
541
+ mod .open ({})
542
+ end
543
+ end
544
+
537
545
function mod .refresh ()
538
546
vim .api .nvim_buf_call (vim .uri_to_bufnr (panel_uri_to_doc_uri (panel .panel_uri )), function ()
539
547
panel :refresh ()
You can’t perform that action at this time.
0 commit comments