Skip to content

Fzf appends :0 or :1 to all my entries #1167

Answered by ibhagwan
JosefLitos asked this question in Q&A
Discussion options

You must be logged in to vote

I found your problem, you’re using gsub directly inside the table which does return a tuple (not table.concat as I previously assumed), both gsub return values get unpacked into the table and then used as the extra fields:

Change this:

lines[start_row]:gsub('^\t', indent)

To this:

-- This way we extract only the first tuple ret val
({ lines[start_row]:gsub('^\t', indent) })[1]

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@JosefLitos
Comment options

@ibhagwan
Comment options

Comment options

You must be logged in to vote
2 replies
@JosefLitos
Comment options

@ibhagwan
Comment options

Answer selected by ibhagwan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants