Skip to content

Fix determine whether a path is empty#57

Open
Alex-duzhichao wants to merge 1 commit into
z4p5a9:masterfrom
Alex-duzhichao:master
Open

Fix determine whether a path is empty#57
Alex-duzhichao wants to merge 1 commit into
z4p5a9:masterfrom
Alex-duzhichao:master

Conversation

@Alex-duzhichao
Copy link
Copy Markdown

If we call expand('%p') in a unnamed buffer, we will get an empty
string "". shellescape("") returns an escaped string "''" which
is not empty. So the determine whether a path is empty in current
code takes no effect.

Determine the emptyness using result of expand('%p') fixes this bug.

If we call `expand('%p')` in a unnamed buffer, we will get an empty
string "". `shellescape("")` returns an escaped string "''" which
is not empty. So the determine whether a path is empty in current
code takes no effect.

Determine the emptyness using result of `expand('%p')` fixes this bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant