aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-26 15:11:18 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-26 16:07:20 +0200
commite72793e315466304de70ece5074b455d50e3c521 (patch)
tree177ca085d3387e3b1684a4d603b50fe787eabc7e
parent5a412ab6e2276302418f2535c2128ad9846d3543 (diff)
downloadxK-e72793e315466304de70ece5074b455d50e3c521.tar.gz
xK-e72793e315466304de70ece5074b455d50e3c521.tar.xz
xK-e72793e315466304de70ece5074b455d50e3c521.zip
xW: make newline before unread marker conditional
-rw-r--r--xW/xW.cpp4
1 files changed, 3 insertions, 1 deletions
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<BufferLine>::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