fix(pickers): when no lnum given, don't set entry.lnum (#2865)

Fixes couple of regressions from #2791 when no line number info is given
in the prompt (eg. `file.txt` rather than `file.txt:10`).

Both issues stemming from the fact that when no line number info is
given, the `entry.lnum` was set to `0`. `entry.lnum` is 1-index.
- Sending results to quickfix would send faulty results (closes #2864)
- Will no open the file on the correct (previous) line number

For this, setting the lnum to 1 is still undesirable since this
overwrites the lnum priority handling in the `select` action.
This commit is contained in:
James Trew
2024-01-11 22:35:52 -05:00
committed by GitHub
parent b3ff5f3320
commit d8129bf9f0
2 changed files with 5 additions and 4 deletions

View File

@@ -108,8 +108,6 @@ describe("separates file path location", function()
{
input = "file:",
file = "file",
row = 0,
col = 0,
},
}