Bug: `plenary.filetype` module overwrites `fs_access = false` option with default value
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 55/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Lua
- スター
- 3.5k
- フォーク
- 340
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nvim-lua/plenary.nvim のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
nvim-lua/plenary.nvim#682 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
nvim-lua/plenary.nvim#680 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
nvim-lua/plenary.nvim#675 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
nvim-lua/plenary.nvim#672 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
nvim-lua/plenary.nvim#671 · コメント 1 件 ·
nvim-lua/plenary.nvim の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
HenrikBengtsson/CBI-software#134 ·
-
Nmap
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
secondlife/slua#96 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100