File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11" vim: sts = 4 sw = 4 expandtab
2-
2+ if exists (" g:leetcode_list_buffer_exists" )
3+ echo ' buffer exists'
4+ finish
5+ endif
36let s: current_dir = expand (" <sfile>:p:h" )
47
58python3 <<EOF
@@ -361,11 +364,10 @@ function! s:ListProblemsOfCompany(company_slug, refresh) abort
361364endfunction
362365
363366function ! leetcode#ListProblems (refresh) abort
367+ let buf_name = ' leetcode:///problems/all'
364368 if s: CheckSignIn () == v: false
365369 return
366370 endif
367-
368- let buf_name = ' leetcode:///problems/all'
369371 if buflisted (buf_name)
370372 execute bufnr (buf_name) . ' buffer'
371373 let saved_view = winsaveview ()
@@ -378,6 +380,7 @@ function! leetcode#ListProblems(refresh) abort
378380 setlocal modifiable
379381 silent ! normal ! ggdG
380382 else
383+ let g: leetcode_list_buffer_exists= 1
381384 execute ' rightbelow new ' . buf_name
382385 call s: SetupProblemListBuffer ()
383386 let b: leetcode_buffer_type = ' all'
You can’t perform that action at this time.
0 commit comments