fix handling of ~ in filenames so that :edit ~ does not open a file named '~'
This commit is contained in:
parent
22f31e367c
commit
d49f35817e
|
@ -19,8 +19,9 @@ namespace Kakoune
|
|||
|
||||
String parse_filename(const String& filename)
|
||||
{
|
||||
if (filename.length() >= 2 and filename[0] == '~' and filename[1] == '/')
|
||||
return parse_filename("$HOME/" + filename.substr(2_byte));
|
||||
if (filename.length() >= 1 and filename[0] == '~' and
|
||||
(filename.length() == 1 or filename[1] == '/'))
|
||||
return parse_filename("$HOME" + filename.substr(1_byte));
|
||||
|
||||
ByteCount pos = 0;
|
||||
String result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user