aboutsummaryrefslogtreecommitdiffhomepage
path: root/screen.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-01-12 03:57:38 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-01-12 03:57:38 +0530
commit9f8a1168e6db0788e5741bd97b1bd1d9e443116d (patch)
tree9f98885a289f40db6463dc5e203609e515c4e105 /screen.cpp
parent7bde2b5cbf55a7a1b8e9d0e4546f7b7b1fb0756e (diff)
Modified env.cpp to use env_get_string()
Diffstat (limited to 'screen.cpp')
-rw-r--r--screen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/screen.cpp b/screen.cpp
index 8481170f..f4bc39bb 100644
--- a/screen.cpp
+++ b/screen.cpp
@@ -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;