Skip to content

Commit

Permalink
Change n to r`n when checking if content is the same between an edi…
Browse files Browse the repository at this point in the history
…t and a file
  • Loading branch information
chaosdrop committed May 29, 2020
1 parent 8b440b1 commit 3f95643
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions inc/functions.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,13 @@ TotalNotes := MyNotesArray.MaxIndex()
GuiControl, 1:+Redraw, LV
return
}

SaveFile(QuickNoteName,FileSafeName,QuickNoteBody,Modified) {
FileSafeName := trim(FileSafeName)
QuickNoteName := trim(QuickNoteName)
FileNameTxt := FileSafeName ".txt"
SaveFileName = %U_NotePath%%FileSafeName%.txt
if (SaveFileName =".txt") {
if (SaveFileName =".txt" or Strlen(SaveFileName)<1) {
msgbox Name error #01
return
}
Expand Down
3 changes: 2 additions & 1 deletion inc/lables.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -2059,9 +2059,10 @@ tGuiEscape:
GuiControlGet,working_QuickNote,,%HQNB%
GuiControlGet,working_QuickNoteSafeName,,%HQNFSN%
FileRead, CheckForOldNote, %U_NotePath%%working_QuickNoteSafeName%.txt
working_QuickNote := strreplace(working_QuickNote,"`n","`r`n")
if (working_QuickNote != "" && working_QuickNote != CheckForOldNote) {
OnMessage(0x44, "OnMsgBox")
MsgBox 0x40034, Close?, - Note data will be lost -`nCuntinue to close?
MsgBox 0x40024, Close?, - Note data will be lost -`nCuntinue to close?
OnMessage(0x44, "")
IfMsgBox Yes, {
Gui, 2:Destroy
Expand Down
6 changes: 3 additions & 3 deletions inc/shortcuts.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ ControlGetFocus, OutputVar, FlatNotes - Library
global LVSelectedROW
SaveRowNumber = %LVSelectedROW%
LV_GetText(FileName, LVSelectedROW,8)
iniFileName = RegExReplace(FileName, "\.txt(?:^|$|\r\n|\r|\n)", Replacement := ".ini")
MsgBox , 0x40030, Delete - Note , Delete: %FileName%
iniFileName := RegExReplace(FileName, "\.txt(?:^|$|\r\n|\r|\n)", Replacement := ".ini")
MsgBox , 0x40024, Delete - Note , Delete: %FileName%
IfMsgBox, No
Return
IfMsgBox, Yes
FileRecycle %U_NotePath%%FileName%
FileRecycle %detailsPath%%iniFileName%

for Each, Note in MyNotesArray{
If (Note.8 = FileName){
MyNotesArray.RemoveAt(Each)
Expand Down

0 comments on commit 3f95643

Please sign in to comment.