summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/common/text.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/text.c b/src/common/text.c
index c437634e..246d8e8e 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -343,7 +343,10 @@ scrollback_load (session *sess)
 					text = strip_color (text + 1, -1, STRIP_COLOR);
 				}
 				fe_print_text (sess, text, stamp);
-				g_free (text);
+				if (prefs.text_replay_strip_color)
+				{
+					g_free (text);
+				}
 			}
 			lines++;
 		}
@@ -387,7 +390,10 @@ scrollback_load (session *sess)
 					text = cleaned_text;
 				}
 				fe_print_text (sess, text, stamp);
-				g_free (text);
+				if (prefs.text_replay_strip_color)
+				{
+					g_free (text);
+				}
 			}
 			lines++;
 		}