# # patch "ChangeLog" # from [b142bb9466661d4be7e9738a713327386c0659be] # to [c5b6af776442ffcda8b25b0b94a9785795da0817] # # patch "std_hooks.lua" # from [6fa55a628259f3e1ee47e18eb05617566f29a2fc] # to [c06a28443baa42ca4d4f349a6dd9653d25fa8c0f] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,11 @@ +2005-06-14 Richard Levitte + + * std_hooks.lua (get_preferred_merge2_command, + get_preferred_merge3_command): EDITOR may be undefined. In that + case, os.getenv() returns nil, on which string.lower() chokes. + It's much better to check for that and default to an empty + string. + 2005-06-11 Derek Scherger * commands.cc (complete_command): log command expansion messages --- std_hooks.lua +++ std_hooks.lua @@ -338,7 +338,8 @@ local rfile = tbl.rfile local outfile = tbl.outfile - local editor = string.lower(os.getenv("EDITOR")) + local editor = os.getenv("EDITOR") + if editor ~= nil then editor = string.lower(editor) else editor = "" end if program_exists_in_path("kdiff3") then @@ -427,7 +428,8 @@ local rfile = tbl.rfile local outfile = tbl.outfile - local editor = string.lower(os.getenv("EDITOR")) + local editor = os.getenv("EDITOR") + if editor ~= nil then editor = string.lower(editor) else editor = "" end if program_exists_in_path("kdiff3") then cmd = merge3_kdiff3_cmd (left_path, anc_path, right_path, merged_path, lfile, afile, rfile, outfile)