summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/adapad.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/adapad.adb b/src/adapad.adb
index 154e636..46c4258 100644
--- a/src/adapad.adb
+++ b/src/adapad.adb
@@ -150,6 +150,8 @@ package body Adapad is
end if;
Editor.Show_Insert_Position;
Mod_List.Pop;
+ Changed := True;
+ Set_Title;
Bar.Find_Item ("&Edit/&Redo").Activate;
if Mod_List.At_Start then
Bar.Find_Item ("&Edit/&Undo").Deactivate;
@@ -181,6 +183,8 @@ package body Adapad is
Editor.Set_Insert_Position (Integer (Ch.Place));
end if;
Editor.Show_Insert_Position;
+ Changed := True;
+ Set_Title;
Bar.Find_Item ("&Edit/&Undo").Activate;
if Mod_List.At_End then
Bar.Find_Item ("&Edit/&Redo").Deactivate;
@@ -581,7 +585,10 @@ package body Adapad is
Buffer.Load_File (Name);
Filename := To_Unbounded_String (Name);
Changed := False;
- Buffer.Call_Modify_Callbacks;
+ Set_Title;
+ Mod_List := Change_Vectors.Empty_Vector;
+ Editor.Get_Menu_Bar.Find_Item ("&Edit/&Undo").Deactivate;
+ Editor.Get_Menu_Bar.Find_Item ("&Edit/&Redo").Deactivate;
exception
when Storage_Error =>
FLTK.Dialogs.Alert ("Error reading from file " & Name);
@@ -596,7 +603,7 @@ package body Adapad is
Buffer.Save_File (Name);
Filename := To_Unbounded_String (Name);
Changed := False;
- Buffer.Call_Modify_Callbacks;
+ Set_Title;
exception
when Storage_Error =>
FLTK.Dialogs.Alert ("Error writing to file " & Name);