diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-23 11:21:35 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-23 11:21:35 -0700 |
commit | 5bbf220077145b6c7df9716e45d8f10cc981f01a (patch) | |
tree | 977749a4c21674555b7727579fc151680ccffcf3 /expand.cpp | |
parent | f5d4e3f94caf8d546d811afaac91e67d3608a37b (diff) |
Fix bug where underlining was failing for paths prefixed with ~
Diffstat (limited to 'expand.cpp')
-rw-r--r-- | expand.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1453,9 +1453,9 @@ static wcstring expand_unescape_string( const wcstring &in, int escape_special ) /** Attempts tilde expansion of the string specified, modifying it in place. */ -static void expand_tilde_internal( wcstring &input ) +static void expand_home_directory( wcstring &input ) { - const wchar_t * const in = input.c_str(); + const wchar_t * const in = input.c_str(); if( in[0] == HOME_DIRECTORY ) { int tilde_error = 0; @@ -1503,12 +1503,12 @@ static void expand_tilde_internal( wcstring &input ) } } -void expand_tilde( wcstring &input) +void expand_tilde(wcstring &input) { if( ! input.empty() && input.at(0) == L'~' ) { input.at(0) = HOME_DIRECTORY; - expand_tilde_internal( input ); + expand_home_directory( input ); } } @@ -1631,7 +1631,7 @@ int expand_string( const wcstring &input, std::vector<completion_t> &output, exp { wcstring next = in->at(i).completion; - expand_tilde_internal(next); + expand_home_directory(next); if( flags & ACCEPT_INCOMPLETE ) |