File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,10 @@ function cmd.yank()
177177 local q = utils .curr_question ()
178178 if not q then return end
179179
180- if vim .api .nvim_win_is_valid (q .winid ) then
180+ if vim .api .nvim_buf_is_valid ( q . bufnr ) and vim . api . nvim_win_is_valid (q .winid ) then
181181 vim .api .nvim_set_current_win (q .winid )
182+ vim .api .nvim_set_current_buf (q .bufnr )
183+
182184 local start_i , end_i = q :range ()
183185 vim .cmd ((" %d,%dyank" ):format (start_i , end_i ))
184186 end
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ local M = {
5353
5454 --- @type lc.storage
5555 storage = {
56- home = vim .fn .stdpath (" data" ) .. " /leetcode/ " ,
57- cache = vim .fn .stdpath (" cache" ) .. " /leetcode/ " ,
56+ home = vim .fn .stdpath (" data" ) .. " /leetcode" ,
57+ cache = vim .fn .stdpath (" cache" ) .. " /leetcode" ,
5858 },
5959
6060 --- @type boolean
You can’t perform that action at this time.
0 commit comments