Skip to content

Commit 708c73a

Browse files
author
xdcn4066
committed
修复根据文件类型打开模版问题
1 parent 3e33b02 commit 708c73a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autoload/leetcode.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ function! s:HandleProblemListCR(select_filetype) abort
588588
endif
589589

590590
execute 'rightbelow vnew ' . problem_file_name
591-
call leetcode#ResetSolution(1, a:select_filetype)
591+
call leetcode#ResetSolution(0, a:select_filetype)
592592
endif
593593
endfunction
594594

@@ -759,7 +759,7 @@ function! leetcode#ResetSolution(with_latest_submission, select_filetype) abort
759759
call append('$', code)
760760
silent! normal! ggdd
761761

762-
let problem_desc_file_name = printf('[DESCRIPTION] %s.%s', problem['fid'], problem_slug)
762+
let problem_desc_file_name = printf('[DESCRIPTION] %s.%s.%s', problem['fid'], problem_slug, filetype)
763763
if buflisted(problem_desc_file_name)
764764
execute bufnr(problem_desc_file_name) . 'buffer'
765765
return

0 commit comments

Comments
 (0)