Modified env.cpp to use env_get_string()

This commit is contained in:
Siteshwar Vashisht
2012-01-12 03:57:38 +05:30
parent 7bde2b5cbf
commit 9f8a1168e6
2 changed files with 36 additions and 34 deletions

View File

@@ -204,8 +204,8 @@ static int calc_prompt_width( const wchar_t *prompt )
{
if( prompt[j+1] == L'k' )
{
wchar_t *term_name = env_get( L"TERM" );
if( term_name && wcsstr( term_name, L"screen" ) == term_name )
wcstring term_name = env_get_string( L"TERM" );
if( !term_name.empty() && wcsstr( term_name.c_str(), L"screen" ) == term_name )
{
const wchar_t *end;
j+=2;