From f3965dc14b6288b256e915ea0f58352f3ffce4db Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Thu, 4 Jul 2024 00:26:08 +0200 Subject: [PATCH] +fix: delete line (Ctrl+Shift+D) - fix last line handling --- src/Notepad3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 1659dd8d4..883044691 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -5343,9 +5343,10 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) case IDM_EDIT_DELETELINE: { + bool const bInLastLn = Sci_InLastLine(); UserMarkerDeleteAll(Sci_GetCurrentLineNumber()); SciCall_LineDelete(); - if (Sci_InLastLine()) { + if (bInLastLn) { SciCall_DeleteBack(); SciCall_Home(); }