irongit

A Neovim plugin enabling you to solve LeetCode problems.

refactor: reset code only questions with status `ac` (#72)

kawreauthored
parent 2d8a306commit f440ff5a3948e449905dc7c5942a14d42907ad2aBrowse files

1 file changed, +1 -1

+1-1lua/leetcode-ui/question.lua
@@ -102,7 +102,7 @@ function Question:open_buffer(existed)
102102 pcall(vim.cmd, ("%d,%dfold"):format(1, i))
103103 end
104104
105- if existed then
105+ if existed and self.cache.status == "ac" then
106106 self:reset_lines()
107107 end
108108 end