From df3616a1485d0c385a8ce5bfbf3b70b20f73514c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Apr 2013 00:59:50 +0200 Subject: [PATCH] do not overwrite clipboard content if it already contains what seems like part of changelog entry --- ChangeLog.txt | 5 +++++ bin/commit.hb | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 2e996efbef..452073ce60 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-04-08 00:58 UTC+0200 Viktor Szakats (harbour syenar.net) + * bin/commit.hb + + do not overwrite clipboard content if it already + contains what seems like part of changelog entry + 2013-04-08 00:56 UTC+0200 Viktor Szakats (harbour syenar.net) * tests/inifiles.prg ! fix to prev diff --git a/bin/commit.hb b/bin/commit.hb index 0db57d5183..3755e96403 100644 --- a/bin/commit.hb +++ b/bin/commit.hb @@ -69,7 +69,10 @@ PROCEDURE Main() cLog := GetLastEntry( MemoRead( cLogName ), @nStart, @nEnd ) IF ! Empty( cLog ) hbshell_gtSelect() - hb_gtInfo( HB_GTI_CLIPBOARDDATA, cLog ) + /* if clipboard already contains part of the entry, do not overwrite it */ + IF ! hb_StrReplace( hb_gtInfo( HB_GTI_CLIPBOARDDATA ), Chr( 13 ) + Chr( 10 ), "" ) $ hb_StrReplace( cLog, Chr( 13 ) + Chr( 10 ), "" ) + hb_gtInfo( HB_GTI_CLIPBOARDDATA, cLog ) + ENDIF ENDIF ENDIF ELSE