Bug: `plenary.filetype` module overwrites `fs_access = false` option with default value
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Open lua/plenary/filetype.lua and inspect the option handling around line 161. Verify that an explicitly supplied fs_access = false remains false while an unspecified option receives the default true; the issue is done when both cases behave as expected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue
There's a bug in lua/plenary/filetype.lua where if you explicitly pass fs_access = false as an option, it gets overwritten with the default value true. This causes text matches to be converted to "" when the filepath exists.
Current behavior
In the code at line 161:
opts.fs_access = opts.fs_access or true
This expression will always set opts.fs_access to true if its current value is false.
Expected behavior
The code should only set the default value if opts.fs_access is nil (unspecified), not when it's explicitly set to false.
Proposed fix
Change line 161 to:
opts.fs_access = (opts.fs_access == nil and true) or opts.fs_access
fs_access only gets the default value of true when it hasn't been specified, preserving any explicitly set value including false.
- Ngôn ngữ chính
- Lua
- Star
- 3.5k
- Fork
- 340
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nvim-lua/plenary.nvim
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
nvim-lua/plenary.nvim#682 ·
-
uniform usage of `os.getenv` Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
nvim-lua/plenary.nvim#680 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
nvim-lua/plenary.nvim#675 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
nvim-lua/plenary.nvim#672 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
nvim-lua/plenary.nvim#671 · 1 bình luận ·
Tất cả issue của nvim-lua/plenary.nvim
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
openSUSE/python-rpm-macros#219 ·
-
bug mini.bracketed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
accessibility bug typst
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/quarto-cli#14947 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
HenrikBengtsson/CBI-software#134 ·
-
Nmap
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100