A Neovim plugin enabling you to solve LeetCode problems.
refactor: reset code only questions with status `ac` (#72)
1 file changed, +1 -1
+1-1lua/leetcode-ui/question.lua
| @@ -102,7 +102,7 @@ function Question:open_buffer(existed) | ||
| 102 | 102 | pcall(vim.cmd, ("%d,%dfold"):format(1, i)) |
| 103 | 103 | end |
| 104 | 104 | |
| 105 | - if existed then | |
| 105 | + if existed and self.cache.status == "ac" then | |
| 106 | 106 | self:reset_lines() |
| 107 | 107 | end |
| 108 | 108 | end |