do not overwrite clipboard content if it already contains what seems like part of changelog entry

This commit is contained in:
Viktor Szakats
2013-04-08 00:59:50 +02:00
parent b8a63e3ab7
commit df3616a148
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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