ADDED: If run in interactive mode, note will at first do a list command.

FIXED:          A bug caused note to save bogus timestamps after editing a note.
CHANGED:        It does no more print 3 newlines before the menu in interactive mode.
FIXED:          Some more vars will be resetted during each loop in interactive mode.
                $ListType.
This commit is contained in:
TLINDEN
2012-02-10 20:07:35 +01:00
parent 9a30ffc37a
commit a9ee40e5c2
5 changed files with 32 additions and 10 deletions

View File

@@ -61,7 +61,7 @@ sub import;
use IO::Seekable;
$version = "0.4.1 (binary database)";
$version = "0.4.2 (binary database)";
# process command line args
@@ -374,8 +374,9 @@ sub new
}
# read it in ($note)
$note = "";
open E, "<$TEMP" or die "Could not open $TEMP\n";
$c = 0;
#open E, "<$TEMP" or die "Could not open $TEMP\n";
open E, "<$TEMP" or print "...edit process interupted! No note has been saved.\n"; return;
$c = 0;
while(<E>)
{
$note = $note . $_;
@@ -652,12 +653,18 @@ sub interactive
. $B . "E" . $BB . " Edit "
. $B . "?" . $BB . " Help "
. $B . "Q" . $BB . " Quit ] command> ";
# Initially do a list command!
$maxlen += $timelen;
&list;
# per default let's list all the stuff:
for(;;)
{
#&list;
# reset time
$time = `date +%d\".\"%m\".\"%Y\" \"%T`;
chomp $time;
$ListType = "";
$maxlen = $maxlen_save;
print "\n\n\n";
print C $menu;
# endless until user press "Q" or "q"!
$char = <STDIN>;