From dbf83a85f21c302b6ce0d7dd12a4b813ea65cae8 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 27 Jan 2018 18:31:46 +0100 Subject: [PATCH] yaft: improve newline detection --- src/gui/widget/yaft/ctrlseq/esc.cpp | 1 - src/gui/widget/yaft/yaft_priv.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/yaft/ctrlseq/esc.cpp b/src/gui/widget/yaft/ctrlseq/esc.cpp index 7a171084c..9d448cb11 100644 --- a/src/gui/widget/yaft/ctrlseq/esc.cpp +++ b/src/gui/widget/yaft/ctrlseq/esc.cpp @@ -45,7 +45,6 @@ void YaFT_p::tab(void) void YaFT_p::nl(void) { - nlseen = true; txt.push(""); lines_available++; move_cursor(1, 0); diff --git a/src/gui/widget/yaft/yaft_priv.cpp b/src/gui/widget/yaft/yaft_priv.cpp index 57b2ce873..b75290e12 100644 --- a/src/gui/widget/yaft/yaft_priv.cpp +++ b/src/gui/widget/yaft/yaft_priv.cpp @@ -510,7 +510,8 @@ void YaFT_p::control_character(uint8_t ch) switch(ch) { case BS: bs(); break; case HT: tab(); break; - case LF: nl(); break; + case LF: nlseen = true; + nl(); break; case VT: nl(); break; case FF: nl(); break; case CR: cr(); break;