Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
476ef72f
Commit
476ef72f
authored
Oct 18, 2017
by
Guillaume Melquiond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent user from undoing file content into oblivion.
parent
2840e197
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/ide/why3ide.ml
src/ide/why3ide.ml
+4
-0
No files found.
src/ide/why3ide.ml
View file @
476ef72f
...
...
@@ -821,7 +821,9 @@ let create_source_view =
let
has_changed
=
ref
false
in
Hstr
.
add
source_view_table
f
(
source_page
,
source_view
,
has_changed
,
label
);
n
:=
!
n
+
1
;
source_view
#
source_buffer
#
begin_not_undoable_action
()
;
source_view
#
source_buffer
#
set_text
content
;
source_view
#
source_buffer
#
end_not_undoable_action
()
;
(* At initialization, file has not changed. When it changes, changes the
name of the tab and update has_changed boolean. *)
let
(
_
:
GtkSignal
.
id
)
=
source_view
#
source_buffer
#
connect
#
changed
...
...
@@ -1984,7 +1986,9 @@ let treat_notification n =
begin
try
let
(
_
,
sc_view
,
b
,
l
)
=
Hstr
.
find
source_view_table
file_name
in
sc_view
#
source_buffer
#
begin_not_undoable_action
()
;
sc_view
#
source_buffer
#
set_text
content
;
sc_view
#
source_buffer
#
end_not_undoable_action
()
;
update_label_saved
l
;
b
:=
false
;
with
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment