From e72793e315466304de70ece5074b455d50e3c521 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Wed, 26 Jul 2023 15:11:18 +0200 Subject: xW: make newline before unread marker conditional --- xW/xW.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xW/xW.cpp b/xW/xW.cpp index e4733a2..5a6f4cc 100644 --- a/xW/xW.cpp +++ b/xW/xW.cpp @@ -685,10 +685,12 @@ buffer_print_line(std::vector::const_iterator begin, static void buffer_print_separator() { + bool sameline = !GetWindowTextLength(g.hwndBuffer); + CHARFORMAT2 format = default_charformat(); format.dwEffects &= ~CFE_AUTOCOLOR; format.crTextColor = RGB(0xff, 0x5f, 0x00); - richedit_replacesel(g.hwndBuffer, &format, L"\n---"); + richedit_replacesel(g.hwndBuffer, &format, &L"\n---"[sameline]); } static void -- cgit v1.2.3-70-g09d2